Skip to main content

Sales Orders

The Sales Orders module provides access to contextual information about the current sales order when a widget is rendered within supported sales order–related pages. Widgets can retrieve sales order identifiers, associated customer references, and fulfillment-related metadata for use in validations, conditional logic, and UI extensions.

Methods

Get Salesorder Details

Retrieves data related to the current context. This method allows your widget to fetch record details, field values, or metadata required for rendering or processing logic.

Commonly used for :
  • Fetch record information
  • Read field values
  • Access contextual module data
Supported Locations :
salesorder.details.buttonsalesorder.creation.sidebarsalesorder.lineitem.addsalesorder.details.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.get('salesorder').then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}
Supported Input Keys :
PropertyRequest
adjustmentsalesorder.adjustment
adjustment_descriptionsalesorder.adjustment_description
adjustment_formattedsalesorder.adjustment_formatted
approver_idsalesorder.approver_id
approvers_listsalesorder.approvers_list
attachment_namesalesorder.attachment_name
balancesalesorder.balance
balance_formattedsalesorder.balance_formatted
bcy_adjustmentsalesorder.bcy_adjustment
bcy_discount_totalsalesorder.bcy_discount_total
Show More Supported Input Keys
PropertyRequest
bcy_shipping_chargesalesorder.bcy_shipping_charge
bcy_sub_totalsalesorder.bcy_sub_total
bcy_tax_totalsalesorder.bcy_tax_total
bcy_totalsalesorder.bcy_total
billing_addresssalesorder.billing_address
billing_address_idsalesorder.billing_address_id
branch_idsalesorder.branch_id
commentssalesorder.comments
contact_categorysalesorder.contact_category
contact_personssalesorder.contact_persons
created_by_emailsalesorder.created_by_email
created_by_idsalesorder.created_by_id
created_datesalesorder.created_date
created_date_formattedsalesorder.created_date_formatted
created_timesalesorder.created_time
created_time_formattedsalesorder.created_time_formatted
crm_custom_reference_idsalesorder.crm_custom_reference_id
crm_owner_idsalesorder.crm_owner_id
currency_codesalesorder.currency_code
currency_idsalesorder.currency_id
currency_symbolsalesorder.currency_symbol
custom_fieldssalesorder.custom_fields
customer_idsalesorder.customer_id
customer_namesalesorder.customer_name
datesalesorder.date
date_formattedsalesorder.date_formatted
default_warehouse_idsalesorder.default_warehouse_id
delivery_methodsalesorder.delivery_method
delivery_method_idsalesorder.delivery_method_id
discountsalesorder.discount
discount_applied_on_amountsalesorder.discount_applied_on_amount
discount_percentsalesorder.discount_percent
discount_totalsalesorder.discount_total
discount_total_formattedsalesorder.discount_total_formatted
discount_typesalesorder.discount_type
documentssalesorder.documents
estimate_idsalesorder.estimate_id
exchange_ratesalesorder.exchange_rate
invoiced_statussalesorder.invoiced_status
invoiced_status_formattedsalesorder.invoiced_status_formatted
invoicessalesorder.invoices
is_adv_tracking_in_packagesalesorder.is_adv_tracking_in_package
is_discount_before_taxsalesorder.is_discount_before_tax
is_emailedsalesorder.is_emailed
is_fba_shipment_createdsalesorder.is_fba_shipment_created
is_inclusive_taxsalesorder.is_inclusive_tax
is_offline_paymentsalesorder.is_offline_payment
is_pre_gstsalesorder.is_pre_gst
last_modified_by_idsalesorder.last_modified_by_id
last_modified_timesalesorder.last_modified_time
last_modified_time_formattedsalesorder.last_modified_time_formatted
line_itemssalesorder.line_items
lineitem_location_idsalesorder.lineitem_location_id
merchant_idsalesorder.merchant_id
merchant_namesalesorder.merchant_name
notessalesorder.notes
order_statussalesorder.order_status
order_status_formattedsalesorder.order_status_formatted
paid_statussalesorder.paid_status
paid_status_formattedsalesorder.paid_status_formatted
payment_termssalesorder.payment_terms
payment_terms_labelsalesorder.payment_terms_label
price_precisionsalesorder.price_precision
purchaseorderssalesorder.purchaseorders
reference_numbersalesorder.reference_number
refundable_amountsalesorder.refundable_amount
roundoff_valuesalesorder.roundoff_value
roundoff_value_formattedsalesorder.roundoff_value_formatted
salesorder_idsalesorder.salesorder_id
salesorder_numbersalesorder.salesorder_number
salesperson_idsalesorder.salesperson_id
salesperson_namesalesorder.salesperson_name
shipment_datesalesorder.shipment_date
shipment_date_formattedsalesorder.shipment_date_formatted
shipping_addresssalesorder.shipping_address
shipping_address_idsalesorder.shipping_address_id
shipping_chargesalesorder.shipping_charge
shipping_charge_exclusive_of_taxsalesorder.shipping_charge_exclusive_of_tax
shipping_charge_exclusive_of_tax_formattedsalesorder.shipping_charge_exclusive_of_tax_formatted
shipping_charge_formattedsalesorder.shipping_charge_formatted
shipping_charge_inclusive_of_taxsalesorder.shipping_charge_inclusive_of_tax
shipping_charge_inclusive_of_tax_formattedsalesorder.shipping_charge_inclusive_of_tax_formatted
shipping_charge_sac_codesalesorder.shipping_charge_sac_code
shipping_charge_taxsalesorder.shipping_charge_tax
shipping_charge_tax_exemption_codesalesorder.shipping_charge_tax_exemption_code
shipping_charge_tax_exemption_idsalesorder.shipping_charge_tax_exemption_id
shipping_charge_tax_formattedsalesorder.shipping_charge_tax_formatted
shipping_charge_tax_idsalesorder.shipping_charge_tax_id
shipping_charge_tax_namesalesorder.shipping_charge_tax_name
shipping_charge_tax_percentagesalesorder.shipping_charge_tax_percentage
shipping_charge_tax_typesalesorder.shipping_charge_tax_type
sourcesalesorder.source
statussalesorder.status
status_formattedsalesorder.status_formatted
sub_totalsalesorder.sub_total
sub_total_exclusive_of_discountsalesorder.sub_total_exclusive_of_discount
sub_total_exclusive_of_discount_formattedsalesorder.sub_total_exclusive_of_discount_formatted
sub_total_formattedsalesorder.sub_total_formatted
sub_total_inclusive_of_taxsalesorder.sub_total_inclusive_of_tax
sub_total_inclusive_of_tax_formattedsalesorder.sub_total_inclusive_of_tax_formatted
submitted_bysalesorder.submitted_by
submitted_datesalesorder.submitted_date
submitted_date_formattedsalesorder.submitted_date_formatted
submitter_idsalesorder.submitter_id
tax_roundingsalesorder.tax_rounding
tax_totalsalesorder.tax_total
tax_total_formattedsalesorder.tax_total_formatted
taxessalesorder.taxes
template_idsalesorder.template_id
template_namesalesorder.template_name
template_typesalesorder.template_type
template_type_formattedsalesorder.template_type_formatted
termssalesorder.terms
totalsalesorder.total
total_formattedsalesorder.total_formatted
total_quantitysalesorder.total_quantity
total_quantity_formattedsalesorder.total_quantity_formatted
transaction_rounding_typesalesorder.transaction_rounding_type
zcrm_potential_idsalesorder.zcrm_potential_id
zcrm_potential_namesalesorder.zcrm_potential_name

Set Salesorder Details

Updates or sets data within the current context. This method allows your widget to modify field values, update state, or pass data back to the host application.

Commonly used for :
  • Update field values
  • Set widget or module state
  • Pass data to the parent application
Supported Locations :
salesorder.creation.sidebarsalesorder.lineitem.add
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.set('salesorder.name', <value>).then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}
Supported Input Keys :
PropertyRequest
adjustmentsalesorder.adjustment
adjustment_descriptionsalesorder.adjustment_description
adjustment_formattedsalesorder.adjustment_formatted
approver_idsalesorder.approver_id
approvers_listsalesorder.approvers_list
attachment_namesalesorder.attachment_name
balancesalesorder.balance
balance_formattedsalesorder.balance_formatted
bcy_adjustmentsalesorder.bcy_adjustment
bcy_discount_totalsalesorder.bcy_discount_total
Show More Supported Input Keys
PropertyRequest
bcy_shipping_chargesalesorder.bcy_shipping_charge
bcy_sub_totalsalesorder.bcy_sub_total
bcy_tax_totalsalesorder.bcy_tax_total
bcy_totalsalesorder.bcy_total
billing_addresssalesorder.billing_address
billing_address_idsalesorder.billing_address_id
branch_idsalesorder.branch_id
commentssalesorder.comments
contact_categorysalesorder.contact_category
contact_personssalesorder.contact_persons
created_by_emailsalesorder.created_by_email
created_by_idsalesorder.created_by_id
created_datesalesorder.created_date
created_date_formattedsalesorder.created_date_formatted
created_timesalesorder.created_time
created_time_formattedsalesorder.created_time_formatted
crm_custom_reference_idsalesorder.crm_custom_reference_id
crm_owner_idsalesorder.crm_owner_id
currency_codesalesorder.currency_code
currency_idsalesorder.currency_id
currency_symbolsalesorder.currency_symbol
custom_fieldssalesorder.custom_fields
customer_idsalesorder.customer_id
customer_namesalesorder.customer_name
datesalesorder.date
date_formattedsalesorder.date_formatted
default_warehouse_idsalesorder.default_warehouse_id
delivery_methodsalesorder.delivery_method
delivery_method_idsalesorder.delivery_method_id
discountsalesorder.discount
discount_applied_on_amountsalesorder.discount_applied_on_amount
discount_percentsalesorder.discount_percent
discount_totalsalesorder.discount_total
discount_total_formattedsalesorder.discount_total_formatted
discount_typesalesorder.discount_type
documentssalesorder.documents
estimate_idsalesorder.estimate_id
exchange_ratesalesorder.exchange_rate
invoiced_statussalesorder.invoiced_status
invoiced_status_formattedsalesorder.invoiced_status_formatted
invoicessalesorder.invoices
is_adv_tracking_in_packagesalesorder.is_adv_tracking_in_package
is_discount_before_taxsalesorder.is_discount_before_tax
is_emailedsalesorder.is_emailed
is_fba_shipment_createdsalesorder.is_fba_shipment_created
is_inclusive_taxsalesorder.is_inclusive_tax
is_offline_paymentsalesorder.is_offline_payment
is_pre_gstsalesorder.is_pre_gst
last_modified_by_idsalesorder.last_modified_by_id
last_modified_timesalesorder.last_modified_time
last_modified_time_formattedsalesorder.last_modified_time_formatted
line_itemssalesorder.line_items
lineitem_location_idsalesorder.lineitem_location_id
merchant_idsalesorder.merchant_id
merchant_namesalesorder.merchant_name
notessalesorder.notes
order_statussalesorder.order_status
order_status_formattedsalesorder.order_status_formatted
paid_statussalesorder.paid_status
paid_status_formattedsalesorder.paid_status_formatted
payment_termssalesorder.payment_terms
payment_terms_labelsalesorder.payment_terms_label
price_precisionsalesorder.price_precision
purchaseorderssalesorder.purchaseorders
reference_numbersalesorder.reference_number
refundable_amountsalesorder.refundable_amount
roundoff_valuesalesorder.roundoff_value
roundoff_value_formattedsalesorder.roundoff_value_formatted
salesorder_idsalesorder.salesorder_id
salesorder_numbersalesorder.salesorder_number
salesperson_idsalesorder.salesperson_id
salesperson_namesalesorder.salesperson_name
shipment_datesalesorder.shipment_date
shipment_date_formattedsalesorder.shipment_date_formatted
shipping_addresssalesorder.shipping_address
shipping_address_idsalesorder.shipping_address_id
shipping_chargesalesorder.shipping_charge
shipping_charge_exclusive_of_taxsalesorder.shipping_charge_exclusive_of_tax
shipping_charge_exclusive_of_tax_formattedsalesorder.shipping_charge_exclusive_of_tax_formatted
shipping_charge_formattedsalesorder.shipping_charge_formatted
shipping_charge_inclusive_of_taxsalesorder.shipping_charge_inclusive_of_tax
shipping_charge_inclusive_of_tax_formattedsalesorder.shipping_charge_inclusive_of_tax_formatted
shipping_charge_sac_codesalesorder.shipping_charge_sac_code
shipping_charge_taxsalesorder.shipping_charge_tax
shipping_charge_tax_exemption_codesalesorder.shipping_charge_tax_exemption_code
shipping_charge_tax_exemption_idsalesorder.shipping_charge_tax_exemption_id
shipping_charge_tax_formattedsalesorder.shipping_charge_tax_formatted
shipping_charge_tax_idsalesorder.shipping_charge_tax_id
shipping_charge_tax_namesalesorder.shipping_charge_tax_name
shipping_charge_tax_percentagesalesorder.shipping_charge_tax_percentage
shipping_charge_tax_typesalesorder.shipping_charge_tax_type
sourcesalesorder.source
statussalesorder.status
status_formattedsalesorder.status_formatted
sub_totalsalesorder.sub_total
sub_total_exclusive_of_discountsalesorder.sub_total_exclusive_of_discount
sub_total_exclusive_of_discount_formattedsalesorder.sub_total_exclusive_of_discount_formatted
sub_total_formattedsalesorder.sub_total_formatted
sub_total_inclusive_of_taxsalesorder.sub_total_inclusive_of_tax
sub_total_inclusive_of_tax_formattedsalesorder.sub_total_inclusive_of_tax_formatted
submitted_bysalesorder.submitted_by
submitted_datesalesorder.submitted_date
submitted_date_formattedsalesorder.submitted_date_formatted
submitter_idsalesorder.submitter_id
tax_roundingsalesorder.tax_rounding
tax_totalsalesorder.tax_total
tax_total_formattedsalesorder.tax_total_formatted
taxessalesorder.taxes
template_idsalesorder.template_id
template_namesalesorder.template_name
template_typesalesorder.template_type
template_type_formattedsalesorder.template_type_formatted
termssalesorder.terms
totalsalesorder.total
total_formattedsalesorder.total_formatted
total_quantitysalesorder.total_quantity
total_quantity_formattedsalesorder.total_quantity_formatted
transaction_rounding_typesalesorder.transaction_rounding_type
zcrm_potential_idsalesorder.zcrm_potential_id
zcrm_potential_namesalesorder.zcrm_potential_name

Get Salesorders List

Retrieves multiple data points or a collection of records related to the current context. This method is useful for fetching lists, related records, or bulk data required for your widget's functionality.

Commonly used for :
  • Fetch related records
  • Retrieve collections of data
  • Access lists or tables of information
Supported Locations :
salesorder.list.sidebarsalesorder.list.button
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.get('salesorders').then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}
Supported Input Keys :
PropertyRequest
company_namesalesorder.company_name
created_timesalesorder.created_time
created_time_formattedsalesorder.created_time_formatted
currency_codesalesorder.currency_code
currency_idsalesorder.currency_id
customer_idsalesorder.customer_id
customer_namesalesorder.customer_name
datesalesorder.date
date_formattedsalesorder.date_formatted
delivery_datesalesorder.delivery_date
Show More Supported Input Keys
PropertyRequest
delivery_methodsalesorder.delivery_method
delivery_method_idsalesorder.delivery_method_id
due_by_dayssalesorder.due_by_days
due_in_dayssalesorder.due_in_days
emailsalesorder.email
has_attachmentsalesorder.has_attachment
invoiced_so_statussalesorder.invoiced_so_status
invoiced_statussalesorder.invoiced_status
invoiced_status_formattedsalesorder.invoiced_status_formatted
is_emailedsalesorder.is_emailed
last_modified_timesalesorder.last_modified_time
order_statussalesorder.order_status
order_status_formattedsalesorder.order_status_formatted
paid_statussalesorder.paid_status
paid_status_formattedsalesorder.paid_status_formatted
quantity_invoicedsalesorder.quantity_invoiced
reference_numbersalesorder.reference_number
salesorder_idsalesorder.salesorder_id
salesorder_numbersalesorder.salesorder_number
salesperson_namesalesorder.salesperson_name
shipment_datesalesorder.shipment_date
shipment_date_formattedsalesorder.shipment_date_formatted
shipment_dayssalesorder.shipment_days
shipped_so_statussalesorder.shipped_so_status
statussalesorder.status
status_formattedsalesorder.status_formatted
totalsalesorder.total
total_formattedsalesorder.total_formatted
total_invoiced_amountsalesorder.total_invoiced_amount
total_invoiced_amount_formattedsalesorder.total_invoiced_amount_formatted
zcrm_potential_idsalesorder.zcrm_potential_id
zcrm_potential_namesalesorder.zcrm_potential_name
selectedsalesorder.selected

Set Salesorder customfields

Specifically designed to update custom field values within the current context. This method allows your widget to target and modify custom fields without affecting standard fields, ensuring precise data management.

Commonly used for :
  • Update custom field values
  • Manage user-defined data points
  • Ensure targeted updates to specific fields
Supported Locations :
salesorder.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.set('salesorder.<custom_field_api_name>',<value>).then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}

Get Line Items

This method allows you to retrieve the line items associated with the current sales order. It can be used to fetch details such as product information, quantity, rate, and total for each line item. This is particularly useful when you want to display or utilize the sales order's line item details within your widget or extension.

Supported Locations :
salesorder.creation.sidebarsalesorder.lineitem.add
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.get('salesorder.line_items').then(function (res) {
      console.log('salesorder line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching salesorder line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_item_idline_item_id
item_orderitem_order
item_iditem_id
raterate
namename
descriptiondescription
quantityquantity
discountdiscount
discountsdiscounts
tax_idtax_id
Show More Supported Input Keys
PropertyRequest
tagstags
tax_exemption_codetax_exemption_code
tax_exemption_idtax_exemption_id
avatax_tax_codeavatax_tax_code
item_custom_fieldsitem_custom_fields
hsn_or_sachsn_or_sac
warehouse_idwarehouse_id
location_idlocation_id
gst_treatment_codegst_treatment_code
tax_treatment_codetax_treatment_code
project_idproject_id
pricebook_idpricebook_id
header_nameheader_name
header_idheader_id
tax_amounttax_amount
is_discountedis_discounted
unitunit
unit_conversion_idunit_conversion_id
tds_tax_idtds_tax_id
item_meta_fieldsitem_meta_fields
sat_item_key_codesat_item_key_code
unitkey_codeunitkey_code
non_taxable_amountnon_taxable_amount
product_typeproduct_type
product_tax_categoryproduct_tax_category
mapped_itemsmapped_items
tax_selection_modetax_selection_mode
line_item_taxesline_item_taxes
line_item_tdsline_item_tds
cost_sourcecost_source
purchase_pricepurchase_price

Set Line Items

This methods is to allowed for set a list of line items in the current invoice. It can be used to set details such as product information, quantity, rate, and total for multiple line items. This is particularly useful when you want to update or set multiple line items details within your widget or extension.This methods is append the line items to the existing line items in the invoice.

Supported Locations :
salesorder.creation.sidebarsalesorder.lineitem.add
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    var lineItemMetaData =[{'rate':'1000','description':'Table','name':'Table'},{'rate':'1000','description':'Monitor','name':'Monitor'}]
    ZFAPPS.set('salesorder.line_items',lineItemMetaData).then(function (res) {
      console.log('salesorder line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching salesorder line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_item_idline_item_id
item_orderitem_order
item_iditem_id
raterate
namename
descriptiondescription
quantityquantity
discountdiscount
discountsdiscounts
tax_idtax_id
Show More Supported Input Keys
PropertyRequest
tagstags
tax_exemption_codetax_exemption_code
tax_exemption_idtax_exemption_id
avatax_tax_codeavatax_tax_code
item_custom_fieldsitem_custom_fields
hsn_or_sachsn_or_sac
warehouse_idwarehouse_id
location_idlocation_id
gst_treatment_codegst_treatment_code
tax_treatment_codetax_treatment_code
project_idproject_id
pricebook_idpricebook_id
header_nameheader_name
header_idheader_id
tax_amounttax_amount
is_discountedis_discounted
unitunit
unit_conversion_idunit_conversion_id
tds_tax_idtds_tax_id
item_meta_fieldsitem_meta_fields
sat_item_key_codesat_item_key_code
unitkey_codeunitkey_code
non_taxable_amountnon_taxable_amount
product_typeproduct_type
product_tax_categoryproduct_tax_category
mapped_itemsmapped_items
tax_selection_modetax_selection_mode
line_item_taxesline_item_taxes
line_item_tdsline_item_tds
cost_sourcecost_source
purchase_pricepurchase_price

Set Single Line Items

This methods is to allowed for setting/updating a single line item in the current invoice. It can be used to set details such as product information, quantity, rate, and total for a single line item. This is particularly useful when you want to update or set a single line item details within your widget or extension.

Supported Locations :
salesorder.creation.sidebarsalesorder.lineitem.add
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.set('salesorder.line_items[0]',{'rate':'1000'}).then(function (res) {
      console.log('salesorder line item rate : ', res);
    }).catch(function (err) {
      console.log('Error while fetching salesorder line item rate : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_item_idline_item_id
item_orderitem_order
item_iditem_id
raterate
namename
descriptiondescription
quantityquantity
discountdiscount
discountsdiscounts
tax_idtax_id
Show More Supported Input Keys
PropertyRequest
tagstags
tax_exemption_codetax_exemption_code
tax_exemption_idtax_exemption_id
avatax_tax_codeavatax_tax_code
item_custom_fieldsitem_custom_fields
hsn_or_sachsn_or_sac
warehouse_idwarehouse_id
location_idlocation_id
gst_treatment_codegst_treatment_code
tax_treatment_codetax_treatment_code
project_idproject_id
pricebook_idpricebook_id
header_nameheader_name
header_idheader_id
tax_amounttax_amount
is_discountedis_discounted
unitunit
unit_conversion_idunit_conversion_id
tds_tax_idtds_tax_id
item_meta_fieldsitem_meta_fields
sat_item_key_codesat_item_key_code
unitkey_codeunitkey_code
non_taxable_amountnon_taxable_amount
product_typeproduct_type
product_tax_categoryproduct_tax_category
mapped_itemsmapped_items
tax_selection_modetax_selection_mode
line_item_taxesline_item_taxes
line_item_tdsline_item_tds
cost_sourcecost_source
purchase_pricepurchase_price

Set Bulk Line Items

This methods is to allowed for replacing/updating all the existing line items in the current invoice. It can be used to set details such as product information, quantity, rate, and total for multiple line items. This is particularly useful when you want to update or set multiple line items details within your widget or extension.

Supported Locations :
salesorder.creation.sidebarsalesorder.lineitem.add
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    var lineItemMetaData =[{'rate':'1000','description':'Table','name':'Table'},{'rate':'1000','description':'Monitor','name':'Monitor'}]
    ZFAPPS.set('salesorder.line_items.bulk_update',lineItemMetaData).then(function (res) {
      console.log('salesorder line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching salesorder line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_item_idline_item_id
item_orderitem_order
item_iditem_id
raterate
namename
descriptiondescription
quantityquantity
discountdiscount
discountsdiscounts
tax_idtax_id
Show More Supported Input Keys
PropertyRequest
tagstags
tax_exemption_codetax_exemption_code
tax_exemption_idtax_exemption_id
avatax_tax_codeavatax_tax_code
item_custom_fieldsitem_custom_fields
hsn_or_sachsn_or_sac
warehouse_idwarehouse_id
location_idlocation_id
gst_treatment_codegst_treatment_code
tax_treatment_codetax_treatment_code
project_idproject_id
pricebook_idpricebook_id
header_nameheader_name
header_idheader_id
tax_amounttax_amount
is_discountedis_discounted
unitunit
unit_conversion_idunit_conversion_id
tds_tax_idtds_tax_id
item_meta_fieldsitem_meta_fields
sat_item_key_codesat_item_key_code
unitkey_codeunitkey_code
non_taxable_amountnon_taxable_amount
product_typeproduct_type
product_tax_categoryproduct_tax_category
mapped_itemsmapped_items
tax_selection_modetax_selection_mode
line_item_taxesline_item_taxes
line_item_tdsline_item_tds
cost_sourcecost_source
purchase_pricepurchase_price

Set Line Items Customfields

This method is allowed for setting/updating custom fields for line items in the current sales order. It can be used to set details such as product information, quantity, rate, total, and custom field values for multiple line items. This is particularly useful when you want to update or set multiple line items details along with their custom field values within your widget or extension.

Supported Locations :
salesorder.creation.sidebarsalesorder.lineitem.add
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    var lineItemMetaData =[{'rate':'1000','description':'Table','name':'Table','item_custom_fields':[{'api_name':'<line_item_custom_field_name>', 'value':'<value>'}]}]
    ZFAPPS.set('salesorder.line_items',lineItemMetaData).then(function (res) {
      console.log('salesorder line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching salesorder line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_item_idline_item_id
item_orderitem_order
item_iditem_id
raterate
namename
descriptiondescription
quantityquantity
discountdiscount
discountsdiscounts
tax_idtax_id
Show More Supported Input Keys
PropertyRequest
tagstags
tax_exemption_codetax_exemption_code
tax_exemption_idtax_exemption_id
avatax_tax_codeavatax_tax_code
item_custom_fieldsitem_custom_fields
hsn_or_sachsn_or_sac
warehouse_idwarehouse_id
location_idlocation_id
gst_treatment_codegst_treatment_code
tax_treatment_codetax_treatment_code
project_idproject_id
pricebook_idpricebook_id
header_nameheader_name
header_idheader_id
tax_amounttax_amount
is_discountedis_discounted
unitunit
unit_conversion_idunit_conversion_id
tds_tax_idtds_tax_id
item_meta_fieldsitem_meta_fields
sat_item_key_codesat_item_key_code
unitkey_codeunitkey_code
non_taxable_amountnon_taxable_amount
product_typeproduct_type
product_tax_categoryproduct_tax_category
mapped_itemsmapped_items
tax_selection_modetax_selection_mode
line_item_taxesline_item_taxes
line_item_tdsline_item_tds
cost_sourcecost_source
purchase_pricepurchase_price