Fetching Customer TIN through Custom Fields and Scripts


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


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



add_fetch works only at time of selection.

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