Loading
Salesforce now sends email only from verified domains. Read 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
          Create a PrintLayoutV2 Contract

          Create a PrintLayoutV2 Contract

          To show PDF reports in the Consumer Goods offline mobile app and to print those reports, create a PrintLayoutV2 contract in Visual Studio Code-based Modeler .

          Required Editions

          Available in: Professional, Enterprise, and Unlimited Editions that have Consumer Goods Cloud enabled
          User Permissions Needed
          To create a PrintLayoutV2 contract: CG Cloud Developer AND Admin
          1. Open Visual Studio Code-based Modeler.
          2. In your Modeler workspace, create a folder called MyDisplayPDF at the location: $workspace/src/MyDisplay/PL.
          3. To create a PrintLayoutV2 contract, copy this template in a blank XML file:
            <PrintLayout name="${#Name#}PDF" xmlns="https://www.salesforce.com/cgcloud/xsds" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <Declarations></Declarations>
            <ReportLayout></ReportLayout>
            </PrintLayout>
            
          4. Save the contract as MyDisplayPDF.printlayoutv2.xml.
          5. To check for validation errors, build your contracts by running sf mdl build.
          6. In the Declaration section, create two declarations:
            <DataDeclaration name="currentDisplay" type="BoMyDisplay" />
            <DataDeclaration name="loDisplays" type="LoMyDisplays" />
            
          7. Save your changes.
          8. To check for validation errors, build your contracts by running sf mdl build.
           
          Loading
          Salesforce Help | Article