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 the icon in the upper left-hand corner of the screen. Then, click the Perspectium Replicator app.

In the navigation bar near the top of the screen, click Dynamic Shares. Then, click into the dynamic share that you want to modify Apex triggers for.

To modify the SOQL query in your parent SObject's Apex trigger, create a query using the dropdowns next to Filter Field (choose a field to filter on, an operator, and type a value in the textbox). Then, click Add Filter to see how the triggerWhere clause in your Apex trigger will be updated. To save your parent SObject Apex trigger, scroll down to the bottom of the form and click Save. The Parent Apex Trigger Preview window will then update its triggerWhere clause to include the filter you just created. Finally, click Save Trigger to save the changes you made to your dynamic share.

To modify the SOQL query in the Apex triggers for child SObjects associated with the parent SObject you are dynamic sharing, scroll down to the Child Settings section. Choose any child records you want to include in your dynamic share by using the arrows to move available child records from the list on the left to the list on the right next to Include Child Records. Click to highlight the child record that you want to modify the Apex trigger for. Then, create a query using the dropdowns next to Child Filter Field (choose a field to filter on, an operator, and type a value in the textbox). Then, click Add Filter to see how the triggerWhere clause in your child Apex trigger will be updated. To save your child SObject Apex trigger, click Save Child Trigger. Finally, click Save and then Save Trigger to save the changes you made to your dynamic share.