Hello!
I still make my new app, and I have a small problem… I have a Link field, suppose to show and search in Description but show me ID… How Can I change these?
In just set “In List” in the Description field, but even that set, doesn’t show…
Thanks
Cheers!
Hi Fellipeh,
In frappe id(name) is a primary key, so linking is possible only with Id.
You can make search based on any field. To achieve this with two ways,
Add columns in Search Fields
on doctype
You have to write get_query on link field.
Consider following links,
}
});
}
}
make_inter_company_invoice() {
frappe.model.open_mapped_doc({
method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.make_inter_company_purchase_invoice",
frm: me.frm
});
}
debit_to() {
var me = this;
if(this.frm.doc.debit_to) {
me.frm.call({
method: "frappe.client.get_value",
args: {
doctype: "Account",
fieldname: "account_currency",
filters: { name: me.frm.doc.debit_to },
return accounts
tax_accounts = get_accounts(True)
if not tax_accounts:
tax_accounts = get_accounts(False)
return tax_accounts
@frappe.whitelist()
@frappe.validate_and_sanitize_search_inputs
def item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=False):
doctype = "Item"
conditions = []
if isinstance(filters, str):
filters = json.loads(filters)
# Get searchfields from meta and use in Item Link field query
meta = frappe.get_meta(doctype, cached=True)
Best Regards,
Saurabh
New Indictrans Technologies Pvt Ltd
Thanks for your reply!
I think it was not clear in my topic…
I know Id is a primary key, and the “link” is made with them… but my question is these:
Here is the screenshot of my app:
If I start do type: Fellipe… works ok, frappe find the record… but when I leave the field, show me CNT00001 instead of the name Fellipe Henrique
I want to show on field the name Fellipe Henrique not the ID.
There’s way to do these?
You have to make another field for Description and on selection of Id, set the description.
Check Not Found
The link is not live. Can you please post an updated one since I am also looking for a solution for the same issue
Hi @fellipeh did you find any solution for this???
Please check the following thread:
I have created a field in item master…same field is created in sales order item also…When i select an item in sales order, the data from master from that particular field should appear in sales order item…How can i do that
JoEz
July 20, 2016, 7:34am
8
@shamsheer have a look at
you can install using: bench get-app
u need to comment out:
frappe.require('assets/title_links/templates/list_item_main.html');
in /title_links/title_links/public/js/title_links.js
or u’ll get error on version 7, work in progress for that …
3 Likes
Anyone solve these issue? trying to use here I doesn’t show on the latest version…
Here is my DocType:
And here is the result:
It’s supposed to show descricao
instead of id
Do I miss something?