---
schema_version: "1"
id: 4fc55dc9c744d02c2184f69c9b815fc0a5ac006d4c0c748fa8c4c13572b9f650
title: Configure the Event Handler
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/configure_the_event_handler.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.configure_the_event_handler.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 00b75362ae697d039a2ac6dc0c3d50158012e4ed31f0161fbc6ee0f45f4074eb
description: 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.
products:
  - Consumer Goods
release: "264"
---
# 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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Professional</strong>, <strong>Enterprise</strong>, and <strong>Unlimited</strong> Editions that have Consumer Goods Cloud enabled</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d62738e63">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d62738e63 ">To configure the event handler:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d62738e63 ">CG Cloud Developer AND Admin</td>

          </tr>
        </tbody>
      </table>

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`.