Fetch details from get Items

I Want to Fetch details of purchase orders in the sales order form from the “get items from” button. I’ve added a purchase Order button and List Out all the purchase orders now how can I fetch details of selected purchase orders in sales order form by clicking on get Items? if anyone can Guide Thank You

U can refer to the following, basically, it trying to create Delivery Note based on Sales Order erpnext/delivery_note.js at 21de550549821af00c8ab0719f05b8063fb776c7 · frappe/erpnext · GitHub

thanks for the reply and source code, can you suggest where I should put this code? here is my multi select Dialogebox code

U should park it under refresh and u really did, so it should fine.

yaa, but it showing me error in console Cannot read properties of undefined (reading ‘frm’)

Could u copy paste ur code, easier to try out.

why am I getting this error of argument? if any guidance will provide thanks in advance

Could u try removing allow_child_item_selection: 1 from ur js and try again

yes i tried that and i am getting “getattr(): attribute name must be string” error after that and I want to display item name also in dialogue and without allow child item selection it could be not possible

if any guidence can be Provide,Thanks In Advance