Salesforce Apex triggers for your Salesforce service integration indicate the conditions that will trigger your Salesforce dynamic share. The conditions for the SOQL query that runs as part of a dynamic share's Apex trigger can be manually configured on the Apex Triggers page. To modify the default Apex triggers created for your Salesforce service integration, you will need to create a Base64 encoded condition and specify the fields you want to include in the dynamic share's outbound messages.

WARNING! If you plan to make additional changes to your Apex triggers after manually modifying them, follow the procedure shown below (rather than modifying your Apex triggers in the dynamic share form) to ensure that the manual modifications to your triggers are not overridden.


Prerequisites


(warning) First, you will need to follow the steps to get started with SalesInsight.

(warning) You will also need to ensure that the ActiveCreateUpdate, and Include Attachment boxes are checked for your Salesforce dynamic shares.

Procedure


To modify the Apex triggers for your Salesforce SIAM integration, follow these steps:

Log into your Salesforce organization and click theicon in the top right-hand corner of the screen. Then, click Setup.

In the Quick Find window on the left side of the screen, type and then click Apex Triggers (under Custom Code).

Locate the SObject's Apex trigger that you want to modify. Apex triggers will be named in the following convention: PSP_<dynamic share name>_<child SObject name>_<parent SObject name>. Then, under the Action column, click Edit for the Apex trigger you want to modify.

Replace the triggerWhere value with a Base64 encoded Apex trigger condition. For information on Apex trigger condition syntax, see Apex triggers. To Base64 encode your Apex trigger condition, you can use Base64encode.org.

Optionally, you can also modify the fields to be included in the Salesforce dynamic share's outbound message. To do this, locate the persp.PSPUtil.createPspOutMessage function and modify the third parameter for this function by including any table fields that you want to include in the outbound message when your Salesforce dynamic share triggers. Then, click Save near the top of the form to save your changes.

Using Steps #3-5 as a guide, modify the Apex triggers for any Child SObjects included with your Salesforce dynamic share.