Select with name and store id

Hi,

I am new to ERPNext, I need help on displaying select field.

I have DocType called Design_Master which has the Design_Name and Design_No (Unique Key). Referring this master DocType in Item DocType form using link field , which displays both Design_No and Design_name (defined as search fields), on selection it stores Desing_No , this is fine.

But I need to display only Design_Name in the select box , but while storing I need to store Design_No in the database, just like traditional web site having country field as drop down , which shows country_name in the drop down, but stores country_id in db.

Please some one help on this. Thanks in advance.

Hello,

If it is a link field, then it will save Primary Key in that field only. If Design_No. is the primary key for the Design Master doctype, and this is a link field, then on selecting value, Design No. only will be saved in the field.

Thanks. Is this possible to achieve the same functionality without link field?

@balaksara,

  1. Please refer this link for create drop down of your own way.

https://discuss.frappe.io/t/customise-dropdown-box/7517/4