Use the URL provided by Perspectium Support to install the managed package into any non-sandbox organization.
To install the Perspectium package to a sandbox organization, first make sure that you are logged out of your production environment.
Once you are logged out, use the link provided by your sales representative to install the package making sure the URL uses test.salesforce.com instead of login.salesforce.com:
Replace “login” with “test” like the following example link. https://test.salesforce.com/packaging/installPackage.apexp?….
Before Perspectium Replicator can call an external site, that site must be registered in the Remote Site Settings page, or the callout fails. Salesforce prevents calls to unauthorized network addresses. Perspectium Replicator requires 3 Remote Site Configurations in Salesforce.
To add a remote site setting:
Only #1 is required in production Salesforce organizations. #2 and #3 are used in non-production organizations to programmatically create Apex Triggers based on Dynamic Share configurations. Salesforce prohibits programatic creation of Apex Triggers in production organizations, so the triggers will need to be migrated through a change control process into production organizations.
A connected app integrates an application with Salesforce using APIs. Connected apps use standard SAML and OAuth protocols to authenticate, provide Single Sign-On, and provide tokens for use with Salesforce APIs. In addition to standard OAuth capabilities, connected apps allow administrators to set various security policies and have explicit control over who may use the corresponding applications.
Perspectium Replicator is a connected app when used in non-production organizations because it uses Salesforce APIs to generate Dynamic Share Apex Triggers. The Salesforce APIs is an OAuth protected service that defines the OAuth scopes and callback URL for the Perspectium Replicator connected app. The connected app configuration provides an OAuth Consumer Key and a Consumer Secret used for authorization.
To create a connected app:
Saving your app gives you two new values that the app uses to communicate with Salesforce. These values will be used in the Perspectium Replicator Properties:
If using Salesforce Classic, you can view your Consumer Key and Consumer Secret by following these steps:
As of the Perspectium Europium release, you can view your Consumer Key and Consumer Secret within the Salesforce Lightning UI by following these steps:
Select the Properties tab in the Perspectium Replicator application to configure the application's properties.
In the Perspectium MBS Configuration Properties section fill in the values you received from the Perspectium Support team for:
Once the above prerequisite steps have been completed, use the values for OAuth Endpoint, Client Key and Client Secret in the Dynamic Share Trigger Builder Properties section. You will also need to enter the username, password and security token for a user that has API privileges (used to create Dynamic Share Apex Triggers).
The breakdown of the properties entered for the Dynamic Share Trigger Builder are as follows:
|OAuth Endpoint||https://login.salesforce.com/services/oauth2/token. For sandbox instances use https://test.salesforce.com/services/oauth2/token|
|Client Key||Connected App's Consumer Key as described above|
|Client Secret||Connected App's Consumer Secret as described above|
|User||Salesforce user with API privileges to create Apex triggers|
|Password||Saleforce user's password|
|Security Token||A security token found under the user's My Settings as described below|
The security token for your user can be reset by selecting My Settings under your username in the top right of the Salesforce screen.
If you have verified that the Client Key, Client Secret, User Password, and User Security Token are all correct and the “Test Trigger Builder” is still returning an error please also verify that the user specified is not locked out.
To comply with Salesforce security requirements, fields designated with * are “secure settings” where their values are securely saved into protected settings and are not displayed on the Properties tab even after the settings have been saved into the system.
So to update these settings, you will have to re-enter all secure settings and choose the Save All option.
To only update non-secure settings (such as Bypass User Names or Logging properties), you can use the Save Standard Settings option. This will only save all non-secure settings so you do not have to re-enter all secure setting values again.
If you are upgrading from a version prior to v3.26.0, you will have to re-enter all your settings the first time you upgrade to v3.26.0 or newer.
The “Test MBS Connection” option will run a test to verify if the application is able to successfully connect to MBS. It tests the default MBS properties as listed on the Properties page as well as each queue configured to ensure you are able to connect properly to MBS for sharing and subscribing data.
After selecting the “Test MBS Connection” option, the application will try connecting to each queue and once completed, an information message will be displayed at the top of the Properties page with results:
To deploy Apex triggers in production, you will have to create them in a sandbox org and then move them over to production. You can move them over using change sets.
When 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 of Perspectium's dynamic share Apex triggers.
Before deploying a package from dev to sandbox / production, it is needed for test cases to succeed. In order to meet required test coverage, follow the instructions and examples below.
3. On the top left of the Apex Test Execution page, click on the Select Tests button
4. Check the boxes of the tests that need to be tested
From here, you may click the [View] text to open the class or click the selected tests to view details of the results
In order to deploy a change set, follow the steps and examples provided below:
4. Enter a name for the Change Set and then select Save
5. Select Add in the Change Set Component section
6. Select Apex Trigger from the component type dropdown and check mark the necessary Apex Triggers to add to change set. Also select your test Apex Class if necessary.
7. To create the Change Set, select Add To Change Set and select Upload on the next screen
Now that the Outbound Change Set is created, please go to the Inbound Change Set on the receiving org and select the created Outbound Change Set to deploy.