↵ to select ↑↓ to navigate
iVendNext

iVendNext

Open in ChatGPT
Ask ChatGPT about this page
Open in Claude
Ask Claude about this page

Fetch value in a child table field from Master

Fetch a value into a child table row from another record

This example brings the expiry date of a Batch into each row of the Sales Invoice items table.

A developer adds the script in Desk's Client Script. Search Desk for Client Script, make a new one, and choose Sales Invoice as its DocType. See Client Scripts for how a Client Script is made and saved.

The script runs when you pick a Batch in an item row. It reads the expiry date of that Batch and puts it in the row's expiry date field.

If you only need to copy a field from the linked record, you need no script. Set Fetch From on the child table's Custom Field, for example batch_no.expiry_date. See Fetching Values From Master.

Last updated 2 days ago
Was this helpful?
Thanks!