Skip to main content

Picklists

The Picklists module provides access to picklist configuration data when a widget is rendered within supported locations. Widgets can retrieve predefined picklist values and related metadata for use in validations, conditional logic, and UI extensions.

Methods

Methods

Get Picklist 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
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.get('picklist').then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}
Supported Input Keys :
PropertyRequest
picklist_numberpicklist.picklist_number
datepicklist.date
notespicklist.notes
assignee_idpicklist.assignee_id
line_itemspicklist.line_items
warehouse_idpicklist.warehouse_id
location_idpicklist.location_id
custom_fieldspicklist.custom_fields

Set Picklist 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
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.set('picklist.name', <value>).then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}
Supported Input Keys :
PropertyRequest
picklist_numberpicklist.picklist_number
datepicklist.date
notespicklist.notes
assignee_idpicklist.assignee_id
line_itemspicklist.line_items
warehouse_idpicklist.warehouse_id
location_idpicklist.location_id
custom_fieldspicklist.custom_fields

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

Supported Locations :
picklist.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.get('picklist.line_items').then(function (res) {
      console.log('picklist line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching picklist line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_item_idline_item_id
so_line_item_idso_line_item_id
pr_line_item_idpr_line_item_id
quantity_to_be_pickedquantity_to_be_picked
quantity_pickedquantity_picked
statusstatus
item_custom_fieldsitem_custom_fields
storagesstorages
batchesbatches
serial_numbersserial_numbers
Show More Supported Input Keys
PropertyRequest
preferred_storage_idpreferred_storage_id

Set Line Items

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

Supported Locations :
picklist.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('picklist.line_items',lineItemMetaData).then(function (res) {
      console.log('picklist line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching picklist line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_item_idline_item_id
so_line_item_idso_line_item_id
pr_line_item_idpr_line_item_id
quantity_to_be_pickedquantity_to_be_picked
quantity_pickedquantity_picked
statusstatus
item_custom_fieldsitem_custom_fields
storagesstorages
batchesbatches
serial_numbersserial_numbers
Show More Supported Input Keys
PropertyRequest
preferred_storage_idpreferred_storage_id

Set Single Line Items

This methods is to allowed for setting/updating a single line item in the current picklist. 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 :
picklist.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.set('picklist.line_items[0]',{'rate':'1000'}).then(function (res) {
      console.log('picklist line item rate : ', res);
    }).catch(function (err) {
      console.log('Error while fetching picklist line item rate : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_item_idline_item_id
so_line_item_idso_line_item_id
pr_line_item_idpr_line_item_id
quantity_to_be_pickedquantity_to_be_picked
quantity_pickedquantity_picked
statusstatus
item_custom_fieldsitem_custom_fields
storagesstorages
batchesbatches
serial_numbersserial_numbers
Show More Supported Input Keys
PropertyRequest
preferred_storage_idpreferred_storage_id

Set Bulk Line Items

This methods is to allowed for replacing/updating all the existing line items in the current picklist. 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 :
picklist.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('picklist.line_items.bulk_update',lineItemMetaData).then(function (res) {
      console.log('picklist line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching picklist line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_item_idline_item_id
so_line_item_idso_line_item_id
pr_line_item_idpr_line_item_id
quantity_to_be_pickedquantity_to_be_picked
quantity_pickedquantity_picked
statusstatus
item_custom_fieldsitem_custom_fields
storagesstorages
batchesbatches
serial_numbersserial_numbers
Show More Supported Input Keys
PropertyRequest
preferred_storage_idpreferred_storage_id

Set Line Items Customfields

This method is allowed for setting/updating custom fields for line items in the picklist. 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 :
picklist.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('picklist.line_items',lineItemMetaData).then(function (res) {
      console.log('picklist line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching picklist line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_item_idline_item_id
so_line_item_idso_line_item_id
pr_line_item_idpr_line_item_id
quantity_to_be_pickedquantity_to_be_picked
quantity_pickedquantity_picked
statusstatus
item_custom_fieldsitem_custom_fields
storagesstorages
batchesbatches
serial_numbersserial_numbers
Show More Supported Input Keys
PropertyRequest
preferred_storage_idpreferred_storage_id