How to Populate Customer or Product Picker Created via API
If you do not use the standard Customer or Product picker but you create your own api.product()
or api.customer()
picker, you must explicitly retrieve the product or customer list – it is not done automatically.
The following example shows how to populate Customer input from a header logic:
cProcessor.addOrUpdateInput("ROOT", ["name": "CustomerGroup", "label": "Customer(s)", "type": InputType.CUSTOMERGROUP, "value": [
"customerFieldLabel": "Unique Customer Id",
"customerFieldName" : "customerId",
"customerFieldValue": customerId
]])
The methods api.product()
and api.customer()
have been deprecated in version 14.0; however, it will remain available to ensure backward compatibility. We strongly recommend starting to adopt the queryApi() with the QapiProduct and QapiCustomer for new implementations. Note that while the deprecated method does not entail the removal of functionality, it will no longer be maintained. For more information see the example queryApi() implementation. For more information see the following example queryApi() implementations.
Related content
Found an issue in documentation? Write to us.