Customization in Parent Form field option

Hello, I create one custom field custom_site_location in employee doctype and link Custom doctype Site Location
Site location doctype


Employee doctype add custom field option in come doctype only id like,

How to get employee doctype added custom field custom_site_location options in Site Location doctype id with another field Location Name value
1 place
1
wrfer

Please check this.

1 Like

Ok @NCP it’s work ok now i want to like
1: wrfer
So how to get this type in list option without change in naming rule

It’s possible, but if id field and name is both are there.

please check the concept of Formatter For Link Fields

1 Like

Hello @NCP you can tell me which doctype on i can apply Formatter For Link Fields script

For your case, Employee doctype.

Hello @NCP I apply Employee doctype on client script
frappe.form.link_formatters[‘Site Location’] = function(value, doc) {
if (doc && doc.location_code && doc.location_name) {
return ${doc.location_code} : ${doc.location_name};
} else {
return value; // Default return if the fields are not found
}
};

but it not work

Without understanding a concept, how can I explain? I already provided lots of posts referencing the forum. so check it.

Ok @NCP I will check it Thanks