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
          Model Your App Using Contracts

          Model Your App Using Contracts

          Contracts are objects that use XML to describe certain aspects of the app. Contracts act as device-independent, technology-independent, and form-factor-independent design documents that are converted into run-time objects to be used in the framework or the app.

          Required Editions

          Available in: Lightning Experience in Enterprise and Unlimited Editions that have Consumer Goods Cloud enabled

          Design Contract Package

          The Modeler Design Contract zip consists of core Salesforce design contracts for VS Code based Modeler. We ship the core contracts in all major releases and patch updates of Consumer Goods Cloud. You can download the design contracts from the Custom - Managed section of the Lightning App Builder.

          Types of Modules

          In VS Code based Modeler, the core contracts are organized under modules. Standard and non standard are the two types of modules you can find in VSCode based Modeler.

          A standard module contains these five sub folders:

          • Business Objects — object contracts that group data and logic together.
          • Data Source — contracts that abstract business objects from the database.
          • Processes and UI — contracts used to create new UI.
          • Print Layouts — contracts that define layout of the print layouts like page header and page footer. This defines how the printed report will look like.

          These are classified as non standard modules:

          • Application — It has multiple processes that support the login and dashboard screens. The login screen is displayed when the user executes the application on the simulated app UI. After the login is successful, the dashboard screen is displayed. The dashboard has icons for opening applications. To modify a dashboard, you must first check out the contract for its UI. Generally, an Application process has two contracts, one for the process itself, and one for the UI that it calls.
          • Images — It contains all the images that are used in the Consumer Goods Cloud application. For more information on how to upload and customize images and icons, see Image Contracts.
          • Locale — It contains contracts for different languages and each contract contains labels in specific languages. For more information on how to create a locale contract, see Locale Contracts.
          • SharedWebData — It contains the Domain contract that defines the domains available in the Consumer Goods Cloud offline mobile app. A domain is a customized data type used for columns in a table, SimpleProperty in BusinessObjects, ListObjects, and Declarations in processes. For more information, see Domains Contract.
          • Contract Naming Conventions
            When you create contracts, use the naming convention specified for the contract files.
          • Creation of Custom Modules and Contracts
            Create a custom module, or add an object, method, or user interface to an existing module for your project.
          • Configure Keyword Suggestions in Contracts
            Create or customize well-formed and accurate keywords in contracts by setting up the auto-completion feature in your VS Code based Modeler.
          • Business Object Contracts
            Use a business object contract to show and control data from Salesforce by using custom business logic. You can create business objects by using the business object contract and datasource contract.
          • BusinessObjectHelper Contract
            Use the BoHelper contract in special functions that aren’t bound to an object and don’t require a dedicated data source. For example, to calculate the business between two cities.
          • Business Logic Contracts
            Use business logic contracts to design the behavior of the Consumer Goods Cloud offline mobile app and its features. Business logic contract comprises JavaScript methods that you can use to define how to process and transform data, set access rules, set validations, and perform actions based on certain rules and requirements.
          • Datasource Contracts
            Use datasource contracts to access and manipulate data from an existing database.
          • Domain Contract
            A domain represents the data type used in the Consumer Goods Cloud offline mobile app. When you create a picklist in an org for use in the offline mobile app, create a domain representing this picklist in the Domain Contract. Configure the picklist mapping between the picklist and the Domain in the Salesforce org. The data types are transformed to domain records after the sync with the offline mobile app.
          • External Files Contract
            Use external file contracts to update the external libraries that are used in the Consumer Goods offline mobile app.
          • Image Contract
            Brand your mobile app by using image contracts to add or replace images and icons.
          • List Object Contracts
            List objects are containers for list items used in the Consumer Goods offline mobile app.
          • Locale Contract
            Bring your company brand to the Consumer Goods offline mobile app and make the app easier to use for your global workforce.
          • PrintLayout V2 Contract
            Customize the look and feel of reports and invoices, add logos and signatures, and preview the PDF print layout of your reports.
          • Process Contract
            A Process Contract defines the sequence of actions carried out during the execution of business processes such as orders, promotions, and visits. These actions can be user actions or system actions on the Offline mobile app or can be other actions carried out in the background. Each business process has a unique process contract in XML format. A Process Contract instantiates objects, processes, and events and controls the UI.
          • Plugin Contract
            A plugin is a Javascript file that you can use to create special components such as a pricing engine for complex pricing.
          • Temp Table Contract
            Temp tables are like database tables, they exist on the database but have no counterpart on the backend and are never synced back. The temp tables support the same features as the regular tables, for example, indexes.
          • UI Contract
            A UI contract describes the UI in different design layers, and each layer is defined by a UI pattern. A UI pattern describes the recurring features, layouts, and controller structures, such as adding sections to a page. Add features and UI controls like calendar, images, and tables to a section or area. Use a UI contract to customize the appearance and features of an application page. Define layouts, fields, menus items, and their data sources.
           
          Loading
          Salesforce Help | Article