Insert Values to Sales invoice item from other doctype

need to update the values to sales invoice item from other doctype

Created one Field in item table and same in sales invoice item now required to update item.field1
to sales_invoice_item.field1

@Sangram @shraddha

Hi, i Have found cur_frm.add_fetch(“text_form”, “text_form”, “text_form”) to update in js, can you please help in which js we need to insert this code :slight_smile:
add_fetch(link_fieldname, source_fieldname, target_fieldname)

@Parag_Kapoor

On which form you want it? There are two ways you can add it in form .js file or create a custom script for respective form.

e.g If you have form with name Custom Order then write it in custom_order.js.

@Sangram Thanks i have write the code in custom script and its working

custom script
doctype sales invoice

cur_frm.add_fetch(“item_code”, “text_form”, “text_form”)

1 Like