Link Custom field in other Doc Type

HI Team,

I have created One Field that is Location in item Doctype, while making an Purchase Receipt, in Purchase Receipt item Doctype location of that item will copy and that is not editable.

We have tried below function to fetch location field in Purchase Receipt item Doctype.

cur_frm.add_fetch(“location”, “location”, “location”);

Hi @dineshpanchal432

Try cur_frm.add_fetch(‘item_code’, ‘location’, ‘location’)

Kind Regards,

1 Like

@dineshpanchal432

For future reference have this in mind, It should always be of this syntax

cur_frm.add_fetch(link_field, source_fieldname, target_fieldname);