Configure the PrintV2 Action

Create an action named PrintV2 in the MyDisplay_DisplayDetailsProcess.processflow.xml contract to trigger PDF report generation in the Consumer Goods offline mobile app.

Required Editions

Available in: Professional, Enterprise, and Unlimited Editions that have Consumer Goods Cloud enabled
User Permissions Needed
To configure the PrintV2 action: CG Cloud Developer AND Admin
  1. Open Visual Studio Code-based Modeler.
  2. In your Modeler workspace, in the MyDisplay_DisplayDetailsProcess.processflow.xml contract located at $workspace/src/MyDisplay/PL/MyDisplayPDF, create the PrintPDF action and add it to the Actions section:
    <!-- PDF Print -->
    <Action name="PrintPDF" actionType="PRINTV2" printId="MyDisplayPDF" locale="ApplicationContext::user.languageSpoken" showShareButton="true">
      <Parameters>
        <Input name="currentDisplay" value="ProcessContext::CurrentDisplay" />
        <Input name="loDisplays" value="ProcessContext::DisplayList" />
      </Parameters>
    </Action>
    
  3. Save your changes.
  4. To check for validation errors, build your contracts by running sf mdl build.