To deploy Apex triggers in your Salesforce production organization, you will need to create them Apex triggers in a sandbox organization and then move the triggers over to your production organization. You can move the triggers in this way using change setsWhen deploying change sets, you may need to add a test class that tests your trigger's Apex code to ensure 75% coverage of all Apex code. By default, the Perspectium Managed Package comes with a test class that covers the basic components of Perspectium's dynamic share Apex triggers.


Prerequisites


(warning) First, you will need to install the Perspectium Package for Salesforce.

(warning) You will also need to configure your Salesforce remote site settings.

Procedure


To deploy Apex triggers in a Salesforce production organization, follow these steps:

Log into your sandbox 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 Test Execution (under Custom Code).

In the upper left-hand corner of the Apex Test Execution form, click Select Tests...

For any tests that need to be run, check the box next to each test and then click the Run button.

In the Quick Find window on the left side of the screen, type and then click Outbound Change Sets (under Environments > Change Sets).

At the top of the Change Sets list, click the New button.

Type any name for the change set. Then, click Save.

Under the Change Set Components section, click Add.

From the Component Type dropdown, choose Apex Trigger. Then, check the boxes next to the Apex triggers you want to include:

Apex TriggerTriggers dynamic sharing of...
PSP_Case_Local_Attachment_CaseTriggerattachments added to Salesforce case records
PSP_Case_Local_CaseTriggerSalesforce case record data (excluding attachments and document links)
PSP_Case_Local_ContentDocumentLink_CaseTriggerdocument links added to Salesforce case records

Finally, click Add To Change Set to finish adding the Apex triggers to the change set.

Log into your production 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 Inbound Change Sets (under Environments > Change Sets).

Choose to deploy the change set you created under the Change Sets Awaiting Deployment section.