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
          Add Display Module and List Object

          Add Display Module and List Object

          Create the Display module and add the resources related to the Display functionality to the module, such as list object, data source, and processes.

          Required Editions

          User Permissions Needed
          To customize CG Cloud offline mobile app: Customizer, Developer
          1. Create a module named Display by running the sf modeler workspace add command in your workspace.
            ? Select the resource you want to add. module
            ? Specify a name for the module: Display
            ? Do you really want to create the module 'Display'? Yes
            Successfully created module 'MyDisplay'.
          2. Add a list object by running the sf modeler workspace add command in your workspace.
            ? Select the resource you want to add. listobject
            ? Specify a name for the listobject: Displays
            ? Select the module to which listobject 'Displays' should be added. MyDisplay
            ? Do you really want to create the listobject 'Displays'? Yes
            Successfully created listobject 'LoMyDisplays'.

            The application creates the structure of the list object with default functions, list object and list item files, and with a related data source.

            Thisis the Displays listobject file structure created automatically.
          3. Define the fields of list items. Use LiMyDisplays.listitem.xml to configure the structure and fields of the list items.
            Tip
            Tip You can refer to the code snippet available at $workspace/contractSnippets/YourModule Section/BO/LO_ListObject/_snippets. The contractSnippets directory contains templates or code snippets which illustrate the structure of different Modeler components. <SimpleProperty name="${#Name#}" type="${#Domain#}" dataSourceProperty="${#DataSourceProperty#}" />
            1. To load the display name, use DomText. <SimpleProperty name="description" type="DomLongDescription" dataSourceProperty="description" />
            2. To load the display description, use DomLongDescription. <SimpleProperty name="competitorDisplay" type="DomBool" dataSourceProperty="competitorDisplay" />
            3. To load the competitor checkbox for a display, use DomBool.
            <ListItem name="LiMyDisplays">
              <SimpleProperties>
                <SimpleProperty id="true" name="pKey" type="DomPKey" dataSourceProperty="pKey" />
                <SimpleProperty name="name" type="DomText" dataSourceProperty="name" />
                <SimpleProperty name="description" type="DomLongDescription" dataSourceProperty="description" />
                <SimpleProperty name="competitorDisplay" type="DomBool" dataSourceProperty="competitorDisplay" />
              <SimpleProperties>
            </ListItem>
            
          4. To generate SQL Statement, define the SQL Statement definition in a meta language in the DsLoMyDisplays_sf.datasource.xml data source file. Specify the tables and their selected attributes to query, and the idAttribute of the table.
            <DataSource name="DsLoMyDisplays" backendSystem="sf" businessObjectClass="LoMyDisplays" external="false" editableEntity="Display__c" schemaVersion="2.0">
              <Attributes>
                <Attribute name="pKey" table="Display__c" column="Id" />
                <Attribute name="name" table="Display__c" column="Name" />
                <Attribute name="description" table="Display__c" column="Description__c" />
                <Attribute name="competitorDisplay" table="Display__c" column="Competitor_Display__c" />
              </Attributes>
              <Entities>
                <Entity name="Display__c" alias="" idAttribute="Id" />
              </Entities>
              <QueryCondition/>
              <OrderCriteria />
              <Parameters/>
            </DataSource>
            
          5. Save your changes.
          6. Build the contracts by running the command sf modeler workspace build or the alias command sf mdl ws build in your workspace.
          7. To test the changes, restart the simulator app.
           
          Loading
          Salesforce Help | Article