Loading
Mail Delivery Issue Impacting Email to Salesforce UsersRead More
Visual Studio Code Based Modeler for Consumer Goods Cloud
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          loadLookupsAsync(jsonParams)

          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
          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)
           
          Loading
          Salesforce Help | Article