Autofill from custom doctype to another doctype

Hi! From custom doctype Rental Billing, I would like the document type (link: DocType) and document ID (dynamic link: document_type) to autofill in sales invoice with I click the document link from Rental Billing to Sales Invoice. Please see screenshot:

Is there a client script that can be run for this? Thank you!

@mehmehly where is the rental Billing field in sales invoice ?

@bahaou , there is no rental billing link field. Just a dynamic link field so that sales invoice can be linked to any doctype. Please see below:

Anyone? Help pls :sweat_smile: