A custom field pointing to a field in another form

I want contact department to appear in quotes. From one of the forum threads I created a new field in quotes called “department”, field type: Data and in options i put contact.department. its not working. what is the right way to do it?

instead of Data field use Link field and in Option add Department

Thanks, Makarand

I want the department field from contact form and not department form.

Hi @yashwantc,

Check mark Read only option in department Custom Field in quotes.

Hi, and what should be the field type and options entry?

Hi,

Field Type - Read Only or Data (Just check mark read only options for Data Field.)
Options - contact.department

Hi again, I tried with both field types: Data and Read Only. Also marked the read only check box. With Read Only, the field department appears in quotes but it stays blank. With Data, nothing appears in the quotes form.
In print format when I add the custom field nothing appears.

Hi,
If you are using Contact Person Field from Quotation form, then its field name is
contact_person. so in options of department field try by putting contact_person.department .
Please check the field name of Contact field from which you are trying to fetch department & change options accordingly.

Doesn’t work. In fact anything I put in options is irrelevant. This is what worked for me:

  1. In custom fields form I create a new field and name it Contact Department
  2. Field Type can be Data, Small Text, Read Only (I tested these)
  3. Make it Read Only and save
  4. The field name automatically changes to contact_department. Later I change the label to department.

works perfect!

guys is there a sure way to do this because i need to point to fields in other forms in many places. i just keep hitting and mostly missing until something odd works. is there any help text about it? thanks

Refer below link.
https://frappe.github.io/erpnext/user/manual/en/customize-erpnext/custom-scripts/custom-script-examples/custom-script-fetch-values-from-master

1 Like

NOOOOO dead link again!