How to add the dynamic data for the link field in child table

Hi,

I have a child doctype Payment entry reference. in this doctype reference_name is one field and it having the dynamic_link data type here in this doctype I added one custom field that is sales_inv. Here i want to set the data to sales_inv which the refernce_name field having the data.

You can do this using the server script logic according to the scenario.