Loading
Feature Disruption - Service Cloud VoiceRead More
Feature degradation | Gmail Email delivery failureRead 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
          saveCorrelatedListAsync(listObject, nameOfSaveLO, mappingJSON)

          saveCorrelatedListAsync(listObject, nameOfSaveLO, mappingJSON)

          Fills the Facade's SQL-Statement buffer with statements must save the list items in the list combined with the list items of the nested lists. Depending on the object status these are INSERT, UPDATE or DELETE statements.

          Required Editions

          Available in Lightning Experience in Professional, Unlimited, and Enterprise Editions that have Consumer Goods Cloud enabled.

          For saving the nested list objects a third ListObject and ListItem must be defined. This ListItem contains all the fields required for saving the information to the database. For more information, see Nested List Objects.

          For each item of the parent list the function iterates through the items of the nested ListObject and combines the data as follows:

          • If no mapping is defined the result contains all properties of the parent ListItem and the nested ListItem, which is also contained in the third ListItem. If a property is defined in both list items (parent and nested) the value of the nested ListItem is used.
          • If a mapping is defined the result contains all properties of the parent ListItem, which are also contained in the third ListItem. In addition, the properties defined in the mapping are added or overwritten over the values of the parent ListItem.

          One ListItem of the third ListObject is created and this single instance of the ListItem is used for saving each combined data record. The name of the ListObject is needed instead of the ListItem to get the data source needed for saving.

          Parameters

          Parameter Description
          listObject(ListObject)
          Refers to the list you want to save.
          nameOfSaveLO(String)
          Refers to the name of the ListObject to be used to save the combined data.
          mappingJSON(JSON)
          Refers to the optional JSON-mapping parameters of the nested ListObject to be saved. If a mapping isn’t defined, all parameters of the nested ListObject are added to the ListItem for saving.
           
          Loading
          Salesforce Help | Article