Update another fields when selecting a link

Hi,

i wonder how i can do like sales order item , when i select the item_code than the item_name and description is filled automatically

Thanks
Bobby

add custom script:

cur_frm.add_fetch('supplier', 'vat_number', 'vat_number')

this will fetch value from master
reference: https://kb.frappe.io/kb/customization/fetch-custom-field-value-from-master-to-all-related-transactions