I want to create sales invoice document automatically on the basis on other doctype

I have a doctype clinic slip and i want when user save the voucher details will go to sales invoice doctype and create a new doctype and set the enter the same data and this operation will perform automatically.

@Mohtashim_Shoaib refer this Get Mapped doc documentation

@sagar i dont to use bookmark or button i want when i save the custom doctype voucher automatically sales invoice will submit in background.

Hi @Mohtashim_Shoaib,

You can create this setup on both the server and client sides.

Here’s how it works: When a Sales Order is submitted, a client script is triggered to automatically submit the corresponding Delivery Note. You’ll need to write a script to make this happen, adjusting it according to your specific scenario and mapping the fields accordingly.

Also, check out this link for more details and an example of a server script:

I hope this helps.

Thank You!

yes it’s help me alot now i am facing a problem i think in map i am finding problem. can you guide me it because

Check each field individually before saving. If the Clinic OPD Slip includes a child table and an item, link it to the sales invoice. Please test it yourself. I have provided a comprehensive reference, so it should work for everyone.

Actually, @NCP Clinic OPD Slip does not have any child table there is a item field which had to be set on on sales invoice item table as item will fetch item name i had hardcode the qty and rate will set according to amount of clinic opd slip. in short: no child table is available at clinic opd slip.