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
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 :
window.onload = function () {
ZFAPPS.extension.init().then(function(App) {
ZFAPPS.get('inventory_adjustment').then(function (data) {
}).catch(function (err) {
});
});
}
Supported Input Keys :
| Property | Request |
|---|
| inventory_adjustment_id | inventory_adjustment.inventory_adjustment_id |
| inventory_adjustment_number | inventory_adjustment.inventory_adjustment_number |
| date | inventory_adjustment.date |
| date_formatted | inventory_adjustment.date_formatted |
| status | inventory_adjustment.status |
| status_formatted | inventory_adjustment.status_formatted |
| adjustment_type | inventory_adjustment.adjustment_type |
| adjustment_type_formatted | inventory_adjustment.adjustment_type_formatted |
| account_id | inventory_adjustment.account_id |
| account_name | inventory_adjustment.account_name |
Show More Supported Input Keys
| Property | Request |
|---|
| reason_id | inventory_adjustment.reason_id |
| reason | inventory_adjustment.reason |
| description | inventory_adjustment.description |
| reference_number | inventory_adjustment.reference_number |
| warehouse_id | inventory_adjustment.warehouse_id |
| warehouse_name | inventory_adjustment.warehouse_name |
| location_id | inventory_adjustment.location_id |
| location_name | inventory_adjustment.location_name |
| line_items | inventory_adjustment.line_items |
| custom_fields | inventory_adjustment.custom_fields |
| created_time | inventory_adjustment.created_time |
| last_modified_time | inventory_adjustment.last_modified_time |
| created_by_id | inventory_adjustment.created_by_id |
| last_modified_by_id | inventory_adjustment.last_modified_by_id |
| documents | inventory_adjustment.documents |
| comments | inventory_adjustment.comments |
| approvers_list | inventory_adjustment.approvers_list |
| submitted_by | inventory_adjustment.submitted_by |
| submitted_date | inventory_adjustment.submitted_date |
| submitted_date_formatted | inventory_adjustment.submitted_date_formatted |
| approver_id | inventory_adjustment.approver_id |
| is_bulk_adjustment | inventory_adjustment.is_bulk_adjustment |
| is_value_adjustment | inventory_adjustment.is_value_adjustment |
| is_quantity_adjustment | inventory_adjustment.is_quantity_adjustment |
| total_value | inventory_adjustment.total_value |
| total_value_formatted | inventory_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 :
window.onload = function () {
ZFAPPS.extension.init().then(function(App) {
ZFAPPS.set('inventory_adjustment.name', <value>).then(function (data) {
}).catch(function (err) {
});
});
}
Supported Input Keys :
| Property | Request |
|---|
| inventory_adjustment_id | inventory_adjustment.inventory_adjustment_id |
| inventory_adjustment_number | inventory_adjustment.inventory_adjustment_number |
| date | inventory_adjustment.date |
| date_formatted | inventory_adjustment.date_formatted |
| status | inventory_adjustment.status |
| status_formatted | inventory_adjustment.status_formatted |
| adjustment_type | inventory_adjustment.adjustment_type |
| adjustment_type_formatted | inventory_adjustment.adjustment_type_formatted |
| account_id | inventory_adjustment.account_id |
| account_name | inventory_adjustment.account_name |
Show More Supported Input Keys
| Property | Request |
|---|
| reason_id | inventory_adjustment.reason_id |
| reason | inventory_adjustment.reason |
| description | inventory_adjustment.description |
| reference_number | inventory_adjustment.reference_number |
| warehouse_id | inventory_adjustment.warehouse_id |
| warehouse_name | inventory_adjustment.warehouse_name |
| location_id | inventory_adjustment.location_id |
| location_name | inventory_adjustment.location_name |
| line_items | inventory_adjustment.line_items |
| custom_fields | inventory_adjustment.custom_fields |
| created_time | inventory_adjustment.created_time |
| last_modified_time | inventory_adjustment.last_modified_time |
| created_by_id | inventory_adjustment.created_by_id |
| last_modified_by_id | inventory_adjustment.last_modified_by_id |
| documents | inventory_adjustment.documents |
| comments | inventory_adjustment.comments |
| approvers_list | inventory_adjustment.approvers_list |
| submitted_by | inventory_adjustment.submitted_by |
| submitted_date | inventory_adjustment.submitted_date |
| submitted_date_formatted | inventory_adjustment.submitted_date_formatted |
| approver_id | inventory_adjustment.approver_id |
| is_bulk_adjustment | inventory_adjustment.is_bulk_adjustment |
| is_value_adjustment | inventory_adjustment.is_value_adjustment |
| is_quantity_adjustment | inventory_adjustment.is_quantity_adjustment |
| total_value | inventory_adjustment.total_value |
| total_value_formatted | inventory_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 :
window.onload = function () {
ZFAPPS.extension.init().then(function(App) {
ZFAPPS.set('inventory_adjustment.<custom_field_api_name>',<value>).then(function (data) {
}).catch(function (err) {
});
});
}
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 :
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 :
| Property | Request |
|---|
| line_items | line_items |
| date | date |
| reason | reason |
| description | description |
| adjustment_type | adjustment_type |
| reference_number | reference_number |
| status | status |
| custom_fields | custom_fields |
| documents | documents |
| next_action | next_action |
Show More Supported Input Keys
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 :
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 :
| Property | Request |
|---|
| line_items | line_items |
| date | date |
| reason | reason |
| description | description |
| adjustment_type | adjustment_type |
| reference_number | reference_number |
| status | status |
| custom_fields | custom_fields |
| documents | documents |
| next_action | next_action |
Show More Supported Input Keys
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 :
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 :
| Property | Request |
|---|
| line_items | line_items |
| date | date |
| reason | reason |
| description | description |
| adjustment_type | adjustment_type |
| reference_number | reference_number |
| status | status |
| custom_fields | custom_fields |
| documents | documents |
| next_action | next_action |
Show More Supported Input Keys
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 :
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 :
| Property | Request |
|---|
| line_items | line_items |
| date | date |
| reason | reason |
| description | description |
| adjustment_type | adjustment_type |
| reference_number | reference_number |
| status | status |
| custom_fields | custom_fields |
| documents | documents |
| next_action | next_action |
Show More Supported Input Keys
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 :
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 :
| Property | Request |
|---|
| line_items | line_items |
| date | date |
| reason | reason |
| description | description |
| adjustment_type | adjustment_type |
| reference_number | reference_number |
| status | status |
| custom_fields | custom_fields |
| documents | documents |
| next_action | next_action |
Show More Supported Input Keys