Fetch value from Supplier Address

Hi
My stock entry doubles up as a Delivery challan for subcontract
I want to fetch the GSTIN of the supplier to the stockentry doc
can anybody give a step by step
regards
Hemanth

@krishnanhemanth,

You can add the add_fetch method to fetch and set the value.

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

Hi makarand_b
in my case
the doc is stock entry
i have added field in stock entry >> GSTIN > data type is > Data
i have created a custom script for stock entry and have used the following code
cur_frm.add_fetch(‘supplier_Address’,‘Gstin’,‘Gstin’)
in custom print format, i have added the filed Gstin to print format
the print preview dosent show the filed nor the value
what am i missing
Regards
Hemanth

hi
this is the code i have used
cur_frm.add_fetch(“supplier”,“gst_no”,“tax_id”);
but the filed is not visible on my print preview
i have added custom filed gst_no in stock entry form
i have added the gst_no filed in custom print format
the filed is not visible in print prevew
please help
hemanth

can anybody help me on this issue
regards
hemanth