Skip to end of banner
Go to start of banner

Trigger code when an association is unlinked

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The app allows you to subscribe to Appfire’s Salesforce package events to invoke custom code after a specific action occurs.

To be notified about the UNLINK action, you can create a new Apex class that implements the SfjcActionEventListener interface.

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

The UNLINK event contains the following fields:

  • son - string, e.g. Case

  • soid - string - the Case Id

  • jiraIssueId - string

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.

  • No labels