How to fetch value from one doctype linked to another without saving?

I have a item form and a custom field linked to my custom app doctype now i want to fetch value from item form i.e item_code to the linked form when i create new form using custom linked field

Hi @Yats,

Please check it.

I hope this helps.

Thank You!

i have this item form, from where i create new rental electronics device and i need item_code field value in the stock_item field in the another doctype mentioned below when i create a new form. As i dont save the form i want to fetch value as i go to create new rental electronic device form after filling the item_code field

I hope i am clear . Thanks
also i have been suggested to use get_mapped_doc but i didnt understand its working that much or if there is some other method u can suggest . its better if anyone can help me with example custom script to do it