Loading
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
          Facade.putTrackedObjectInTransaction(object description)

          Facade.putTrackedObjectInTransaction(object description)

          This asynchronous method stores an object change related information in a queue and commits it as part of the next save action triggered by an Consumer Good (CG) Cloud offline mobile app user.

          Required Editions

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

          For example, when a module in the CG Cloud offline mobile app is closed by tapping the Back button or when a process action manually triggers a save. This method is similar to the saveTQObject method, but is applicable only when a database transaction is kept open. For example, a Consumer Goods Cloud offline mobile app user relaunched the application while the order release was in progress. The created order isn’t saved in this scenario.

          Parameters

          object description: The information of the object intended to be saved.

          The object information includes the following parameters:

          • changeType: Indicates the object change status and can have the following values: N: Indicates that the object is to be newly created. U: Indicates that the object is to be updated. D: Indicates that the object is to be deleted.
          • data: Refers to the actual data to be saved in JSON format.
          • idAttribute: Refers to a unique key attribute within a Salesforce object.
          • idProperty: Refers to a unique key attribute within a business object.
          • name: Refers to the name of an object defined in the Salesforce backend.
          • mapping: Refers to the mapping between the simple property names of a business object and the attribute names of a Salesforce object.

          Returns

          The method returns a promise (without any information).

          Example

          
          promise = Facade.putTrackedObjectInTransaction({
          name: mapping.tableName,
          idAttribute: mapping.idColumn,
          idProperty: mapping.idProperty,
          mapping: mapping.columnMapping,
          changeType: changeType,
          data: data
          }).then(function () {
          return when.resolve(true);
          });
          
           
          Loading
          Salesforce Help | Article