You are here:
loadLookupsAsync(jsonParams)
Load lookups. Lookups are read-only objects that contain limited information about a special business object.
Required Editions
| Available in Lightning Experience in Professional, Unlimited, and Enterprise Editions that have Consumer Goods Cloud enabled. |
Parameters
- jsonQuery
- Type: JSON Object
- Load parameters.
Return Value
A lookup object.
Example
var jsonParams = JSON.parse('[{"objectClass":"LuCustomerIsMainDeliveryRecipient", "pKey": "' + pKey+ '", "reference":"luCustomerIsMainDeliveryRecipient"},{"objectClass":"LuCustomerIsMainPayer", "pKey": "' + pKey + '","reference":"luCustomerIsMainPayer"},{"objectClass":"LuCustomerIsMainBillRecipient", "pKey": "' + pKey + '","reference": "luCustomerIsMainBillRecipient"},{"objectClass":"LuCustomerIsMainBroker", "pKey": "' + pKey + '","reference": "luCustomerIsMainBroker"}]');
Facade.loadLookupsAsync(jsonParams)
.then(function(lookups) {
mainDelivRecPKey = lookups.luCustomerIsMainDeliveryRecipient.getFromPKey();
mainPayerPKey =lookups.luCustomerIsMainPayer.getFromPKey();
mainBillRecPKey =lookups.luCustomerIsMainBillRecipient.getFromPKey();
if(me.getBoOrderMeta().getHideBroker() == "0"){
mainBrokerPKey =lookups.luCustomerIsMainBroker.getFromPKey();
if(Utils.isDefined(mainBrokerPKey)){
me.setBrokerCustomerPKey(mainBrokerPKey);
}
else{
me.setBrokerCustomerPKey(" ");
}
}
else{
me.setBrokerCustomerPKey(" ");
}
var jsonParams = JSON.parse('[{"objectClass":"LuCustomerIsMainDeliveryRecipient", "pKey": "' + pKey+ '", "reference":"luCustomerIsMainDeliveryRecipient"},{"objectClass":"LuCustomerIsMainPayer", "pKey": "' + pKey + '","reference":"luCustomerIsMainPayer"},{"objectClass":"LuCustomerIsMainBillRecipient", "pKey": "' + pKey + '","reference": "luCustomerIsMainBillRecipient"},{"objectClass":"LuCustomerIsMainBroker", "pKey": "' + pKey + '","reference": "luCustomerIsMainBroker"}]');
Facade.loadLookupsAsync(jsonParams)
Did this article solve your issue?
Let us know so we can improve!

