Auto create and update new doctype

Hi,
i am trying to create a new doctype “Shipping Bill” when i update a sales invoice. is there any script on the client side where after entering the sales invoice details, a new shipping bill is auto generated and an option to enter the remaining fields in the shipping bill is asked. and help regarding this matter would be highly appreciated.
thanks in advance,
Yash

i don’t know the auto generated way, but i can help you to have a custom button over Sales Invoice “Make Shipping Bill” when clicking on it, it will take you to the New Shipping bill with some fields.