Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

MyListener
Code Block
languagejava
publicglobal class MyListener implements JCFS.SfjcActionEventListener {    
    public void onEvent(String eventName, Map<String,Object> data) {
       System.debug('Hello world!');
       System.debug(eventName);
       System.debug(data);
    }
}

...

In this example, MyListener listens for a UNLINK event between Jira and a Salesforce object. Once the UNLINK event of the association is detected, a debug message is sent to the execution log.

To use this feature, you must grant the WebhookRestResource Apex class access to the integration user profile.

  1. Go to Setup sf-setup-icon.pngImage Addedand enter Apex Classes in the Quick Find field. Select WebhookRestResource > Security.

    image-20240409-130607.pngImage Added
  2. Add the integration user profile to the Enabled Profiles.

    image-20240409-130614.pngImage Added