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
          Configure Sales Org for New Display Records

          Configure Sales Org for New Display Records

          Use Visual Studio Code based Modeler to set a sales organization for new display records to ensure that all data is accurate, consistently organized and categorized, making it easier for sales reps to access and manage information effectively. Sales reps can quickly locate the relevant display data without having to manually input the sales org each time.

          Required Editions

          Available in: Enterprise and Unlimited Editions where Consumer Goods Cloud is enabled
          User Permissions Needed
          To configure sales org in properties in VS Code Modeler Customizer, Developer
          1. In Visual Studio (VS) Code based Modeler, add this attribute to DsBoMyDisplay_sf.datasource.xml.
            <Attribute name="salesOrg" table="Display__c" column="Sales_Org__c" />
          2. In BoMyDisplay.businessobject.xml, add this simple property:
            <SimpleProperty name="salesOrg" type="DomSalesOrg" dataSourceProperty="salesOrg" />
          3. In BoMyDisplay.AfterCreateAsync.bl.js, add this code to set the sales org property:
            var promise=when.resolve(result);
                	me.setObjectStatus(STATE.NEW | STATE.DIRTY);
            me.setSalesOrg(ApplicationContext.get('user').getBoUserSales().getSalesOrg());
            me.mySetEARights();
          4. Save your changes.
          5. To check for validation errors, build the contracts by running this command: sf modeler workspace build
           
          Loading
          Salesforce Help | Article