How to fetch a field from a doctype to custom field on child table of another doctype

i am trying to fetch expiry date from Batch master to sales invoice child table custom field expiry date.
can any body point in right direction. thanks

  1. Create a link field in your child table, linking to Batch (name this field Batch).
  2. Make sure the field type of expiry date in the child table is date type
  3. In the child table, edit the expiry date field, enter the following in the fetch from section:
    batch.expiry_date
    Make the expiry date field in the child table as read only.
1 Like

@Vesper_Solutions


its not working … did i miss something

Are you selecting the batch in the batch linked field?
Also check the name of the expiry date field in the batch. The names of the expiry date fields should prefferably match

@Vesper_Solutions yes after selection of the batch the expiry date doesn’t update. the field name from batch master is correct.

The batch field in the child table is batch_no. So in the fetch from section you should write batch_no.expiry_date. Whenever fetching data from the link field, the format is this:
field_a (the name of the link field)
field_b (the name of the field in the linked document)

field_a.field_b

2 Likes

works like charm… thank you so much …:heartbeat: