ERPNext.com Frappe Cloud Support Partners Foundation Frappe School

Link field should show name and not id

Hello ERPNext team.
we have a customization question.
We are trying to create new DocTypes for Districts, Mandals and Villages. Which will have a name field.
The Issue docTYpe will have a link to these Districts, Mandals and Villages docTypes. What needs to be done so that, when we try to select a district/mdl/village from this Issue doctypes, we see the name itself in the drop down, instead of seeing the ID of the district/mdl/village.
After going through the manual/discussion fourm i found that , we can add “name” field in “search fields”, so that name also shows up in the drop down, but how do we make the name itself as ID, so that when we load data using import tool into Issue table, we can give names of villages/districts directly, instead of id.

I see that territory works like this. If i have a link to Territory docType, the name shows up in dropdown instead of a id.

Pls let us know.

share screenshot of issue

Got the solution from @codingCoffee .
In customization, need to set “Auto Name” to “field:title”. This will make the title to be shown in the dropdown of any other doctype which has this doc as a link.
Thanks @codingCoffee

4 Likes