Skip to main content

Inventory Adjustments

The Inventory Adjustments module exposes context related to inventory correction and adjustment records. Widgets can access adjustment identifiers, affected items, and stock movement metadata. This module is useful for inventory auditing and control extensions.

Methods

Methods

Get Inventory_adjustment 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 :
inventory.adjustment.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.get('inventory_adjustment').then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}
Supported Input Keys :
PropertyRequest
inventory_adjustment_idinventory_adjustment.inventory_adjustment_id
inventory_adjustment_numberinventory_adjustment.inventory_adjustment_number
dateinventory_adjustment.date
date_formattedinventory_adjustment.date_formatted
statusinventory_adjustment.status
status_formattedinventory_adjustment.status_formatted
adjustment_typeinventory_adjustment.adjustment_type
adjustment_type_formattedinventory_adjustment.adjustment_type_formatted
account_idinventory_adjustment.account_id
account_nameinventory_adjustment.account_name
Show More Supported Input Keys
PropertyRequest
reason_idinventory_adjustment.reason_id
reasoninventory_adjustment.reason
descriptioninventory_adjustment.description
reference_numberinventory_adjustment.reference_number
warehouse_idinventory_adjustment.warehouse_id
warehouse_nameinventory_adjustment.warehouse_name
location_idinventory_adjustment.location_id
location_nameinventory_adjustment.location_name
line_itemsinventory_adjustment.line_items
custom_fieldsinventory_adjustment.custom_fields
created_timeinventory_adjustment.created_time
last_modified_timeinventory_adjustment.last_modified_time
created_by_idinventory_adjustment.created_by_id
last_modified_by_idinventory_adjustment.last_modified_by_id
documentsinventory_adjustment.documents
commentsinventory_adjustment.comments
approvers_listinventory_adjustment.approvers_list
submitted_byinventory_adjustment.submitted_by
submitted_dateinventory_adjustment.submitted_date
submitted_date_formattedinventory_adjustment.submitted_date_formatted
approver_idinventory_adjustment.approver_id
is_bulk_adjustmentinventory_adjustment.is_bulk_adjustment
is_value_adjustmentinventory_adjustment.is_value_adjustment
is_quantity_adjustmentinventory_adjustment.is_quantity_adjustment
total_valueinventory_adjustment.total_value
total_value_formattedinventory_adjustment.total_value_formatted

Set Inventory_adjustment 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 :
inventory.adjustment.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.set('inventory_adjustment.name', <value>).then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}
Supported Input Keys :
PropertyRequest
inventory_adjustment_idinventory_adjustment.inventory_adjustment_id
inventory_adjustment_numberinventory_adjustment.inventory_adjustment_number
dateinventory_adjustment.date
date_formattedinventory_adjustment.date_formatted
statusinventory_adjustment.status
status_formattedinventory_adjustment.status_formatted
adjustment_typeinventory_adjustment.adjustment_type
adjustment_type_formattedinventory_adjustment.adjustment_type_formatted
account_idinventory_adjustment.account_id
account_nameinventory_adjustment.account_name
Show More Supported Input Keys
PropertyRequest
reason_idinventory_adjustment.reason_id
reasoninventory_adjustment.reason
descriptioninventory_adjustment.description
reference_numberinventory_adjustment.reference_number
warehouse_idinventory_adjustment.warehouse_id
warehouse_nameinventory_adjustment.warehouse_name
location_idinventory_adjustment.location_id
location_nameinventory_adjustment.location_name
line_itemsinventory_adjustment.line_items
custom_fieldsinventory_adjustment.custom_fields
created_timeinventory_adjustment.created_time
last_modified_timeinventory_adjustment.last_modified_time
created_by_idinventory_adjustment.created_by_id
last_modified_by_idinventory_adjustment.last_modified_by_id
documentsinventory_adjustment.documents
commentsinventory_adjustment.comments
approvers_listinventory_adjustment.approvers_list
submitted_byinventory_adjustment.submitted_by
submitted_dateinventory_adjustment.submitted_date
submitted_date_formattedinventory_adjustment.submitted_date_formatted
approver_idinventory_adjustment.approver_id
is_bulk_adjustmentinventory_adjustment.is_bulk_adjustment
is_value_adjustmentinventory_adjustment.is_value_adjustment
is_quantity_adjustmentinventory_adjustment.is_quantity_adjustment
total_valueinventory_adjustment.total_value
total_value_formattedinventory_adjustment.total_value_formatted

Set Inventory_adjustment 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 :
inventory.adjustment.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.set('inventory_adjustment.<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 inventory adjustment. 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 inventory adjustment's line item details within your widget or extension.

Supported Locations :
inventory.adjustment.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.get('inventory_adjustment.line_items').then(function (res) {
      console.log('inventory_adjustment line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching inventory_adjustment line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_itemsline_items
datedate
reasonreason
descriptiondescription
adjustment_typeadjustment_type
reference_numberreference_number
statusstatus
custom_fieldscustom_fields
documentsdocuments
next_actionnext_action
Show More Supported Input Keys
PropertyRequest
tagstags

Set Line Items

This methods is to allowed for set a list of line items in the current inventory adjustment. 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 inventory adjustment.

Supported Locations :
inventory.adjustment.creation.sidebar
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('inventory_adjustment.line_items',lineItemMetaData).then(function (res) {
      console.log('inventory_adjustment line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching inventory_adjustment line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_itemsline_items
datedate
reasonreason
descriptiondescription
adjustment_typeadjustment_type
reference_numberreference_number
statusstatus
custom_fieldscustom_fields
documentsdocuments
next_actionnext_action
Show More Supported Input Keys
PropertyRequest
tagstags

Set Single Line Items

This methods is to allowed for setting/updating a single line item in the current inventory adjustment. 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 :
inventory.adjustment.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.set('inventory_adjustment.line_items[0]',{'rate':'1000'}).then(function (res) {
      console.log('inventory_adjustment line item rate : ', res);
    }).catch(function (err) {
      console.log('Error while fetching inventory_adjustment line item rate : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_itemsline_items
datedate
reasonreason
descriptiondescription
adjustment_typeadjustment_type
reference_numberreference_number
statusstatus
custom_fieldscustom_fields
documentsdocuments
next_actionnext_action
Show More Supported Input Keys
PropertyRequest
tagstags

Set Bulk Line Items

This methods is to allowed for replacing/updating all the existing line items in the current inventory adjustment. 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 :
inventory.adjustment.creation.sidebar
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('inventory_adjustment.line_items.bulk_update',lineItemMetaData).then(function (res) {
      console.log('inventory_adjustment line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching inventory_adjustment line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_itemsline_items
datedate
reasonreason
descriptiondescription
adjustment_typeadjustment_type
reference_numberreference_number
statusstatus
custom_fieldscustom_fields
documentsdocuments
next_actionnext_action
Show More Supported Input Keys
PropertyRequest
tagstags

Set Line Items Customfields

This method is allowed for setting/updating custom fields for line items in the inventory adjustment. 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 :
inventory.adjustment.creation.sidebar
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('inventory_adjustment.line_items',lineItemMetaData).then(function (res) {
      console.log('inventory_adjustment line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching inventory_adjustment line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_itemsline_items
datedate
reasonreason
descriptiondescription
adjustment_typeadjustment_type
reference_numberreference_number
statusstatus
custom_fieldscustom_fields
documentsdocuments
next_actionnext_action
Show More Supported Input Keys
PropertyRequest
tagstags