Fetch data from delivery note item on click of custom button

Hi,

Use case:

  1. Create custom button ‘Get Items’ in sales invoice

  1. On click of that button ,fetch data from Delivery Note Item doctype and set the data in sales invoice item table.

Thanks in advance!!

Hello @erpnext_user99,

For the First use case,
Go to the Customized form of the sales invoice and create a new field with button type.

Second for fetching the item and set in sales invoice item table
You can write a custom script for that on click of the button fetch the Delivery Note and set into child table.

Thanks for your response!
I have created the custom button through customized form in sales invoice. Basically, it is fetching of data from one child table and setting data in another child table
Can you let me know how to write the custom script for data fetching and then set it in the child table?

Please help!

@erpnext_user99

This can help you