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 |
-
Open Visual Studio Code-based Modeler.
-
In your Modeler workspace, open the MyDisplay_DisplayDetailsProcess.processflow.xml
contract located at $workspace/src/MyDisplay/PL/MyDisplayPDF.
-
In the Action ShowDisplayDetails section, enter this code snippet in the Events node:
<Event name="printPDF" action="PrintPDF"/>
-
Save your changes.
-
To check for validation errors, build your contracts by running
sf mdl build.