Fetching Customer TIN through Custom Fields and Scripts

Hi,

I have added a “Customer TIN” as a “Data” Custom Field in Customer, “Customer TIN” as a “Data” Custom Field in Sales Invoice, I have included a custom script for Sales Invoice that is

cur_frm.add_fetch(‘customer’,‘customer_tin’,‘customer_tin’)

But my Customer TIN field in the Sales Invoice Document continues to remain blank. Would somebody be able to guide me?

Thanks

Jay

add_fetch works only at time of selection.

For old documents, you will have to write an UPDATE query