Fetching data from custom filed to another field


I’ve created a new field in customer records called Freight Automation code, and be able to fetch the data from that field to a field in delivery notes.
I’ve tried using customization form, however fetching isn’t just happening.

Details are below,

Field Name: Freight Region Code
Field Data – List:
AE etc.

Delivery Note
Field Name: Freight Region Code
Field Data: Fetch from customer record.

Could you please help me in setting this up?

You would have to set up a custom script to fetch the value. For example:


Where “customer” is the DocType you are referencing, “freight_region_code0” is the field in customer, and “freight_region_code1” is the field name in Delivery note you wish to propagate.

Thanks Cattmy for immediate response, Could you please also let me know where from to setup the custom script?

In the Setup Module as “Custom Script”

Thanks. I’ll try it.

Hi, I have a question - I found this - Fetch a Field Value from a Document into a Transaction

Erp Next is based on frappe so why I must do a custom script and not to use this? Because this posted solution is not functional in ERP.