Fetch From not working for child table fields when data is added via “Get Sales Orders” button

I am facing an issue with the fetch_from functionality in a child table and need guidance.

Scenario:

  • I also added a custom_po_no field in the Production Plan Sales Order child table of the Production Plan doctype.

  • I configured the child table field with fetch_from = sales_order.po_no.

Issue:
When I use the “Get Sales Orders” button in the Production Plan form:

  • The Sales Orders are populated correctly into the child table.

  • However, the fetch_from does not work for the po_no field.

  • The value is not fetched when the Production Plan form is unsaved.

  • The value only appears after saving the document (or sometimes not at all).

Requirement:
I want to manually trigger the fetch_from behavior using JavaScript so that:

  • When Sales Orders are added via the button,

  • The related fields (like po_no) are immediately fetched into the child table rows,

  • Even when the Production Plan form is not yet saved.

Can someone please suggest:

  • The correct Client Script approach to manually fetch linked field values in a child table?

  • Or the recommended way to trigger fetch_from logic programmatically?