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
          Configure the Event Handler

          Configure the Event Handler

          Create an event handler in the MyDisplay_DisplayDetailsProcess.processflow.xml contract to handle the print PDF event. An event handler is a callback routine that dictates the action that follows an event. For example, to see a PDF report, a sales rep taps the Print PDF button on the Consumer Goods offline app. Here, the button-tapping action is an event, and the generation of PDF report is an event handler.

          Required Editions

          Available in: Professional, Enterprise, and Unlimited Editions that have Consumer Goods Cloud enabled
          User Permissions Needed
          To configure the event handler: CG Cloud Developer AND Admin
          1. Open Visual Studio Code-based Modeler.
          2. In your Modeler workspace, open the MyDisplay_DisplayDetailsProcess.processflow.xml contract located at $workspace/src/MyDisplay/PL/MyDisplayPDF.
          3. In the Action ShowDisplayDetails section, enter this code snippet in the Events node: <Event name="printPDF" action="PrintPDF"/>
          4. Save your changes.
          5. To check for validation errors, build your contracts by running sf mdl build.
           
          Loading
          Salesforce Help | Article