Enabling the Salesforce Integration for custom objects involves creating 'Egnyte Sync Configurations' for those custom objects. The Egnyte for Salesforce package can automatically create these configurations for you, however it is not possible to directly create Apex triggers or test classes in some production organizations. If this is the case, the following guide can be used to deploy the custom object sync Egnyte Sync Configurations to enable the integration for custom objects.
Step 1 - Create Egnyte Sync Configurations for custom objects in a sandbox organization
- Install the Egnyte for Salesforce package in a sandbox environment (there is no need to connect your Egnyte domain to the package or run through any of the post installation steps described in the Installation guide - you will only install the package to automatically create the required triggers and test classes).
- Open the 'Egnyte Sync Configuration' tab in your sandbox organization and click on 'New' to create a new Sync Configuration record.
- Add the selected custom objects and set the 'Auto-generate Trigger' option to 'Yes'. Click 'Continue' then 'Process' to create the triggers and test classes for the custom objects.
Step 2 - Create an outbound change set in your sandbox organization
- Search for 'Outbound Change Sets' in the setup section of your sandbox organization.
- Click 'New' to create an Outbound change set. Enter a name and description and click save.
- After creating the change set, click on 'Add' in the 'Change Set Components' section to add the apex trigger and test class components that were created as part of step 1.
Step 3 - Upload the outbound change set
- After adding all the components, select the 'Upload' option.
- Select the production organization where you want to deploy the triggers and test classes and click on 'Upload' again.
Step 4 - Deploy inbound change set in your production organization (steps should be performed from your production organization)
Search for 'Inbound change sets' in the setup section in your production organization.
Select the change set that was uploaded from the Sandbox organization and click 'Validate' to check if there are any errors in deployment. If the validation does not succeed due to custom validations in your org, you will need to manually change the generated triggers and test classes to pass your custom validations before repeating from step 2.
After validation, click on 'Deploy' to make the components available in your production organization.
You can check the deployment status of your change set (see screenshot below).
Step 5 - Create Egnyte Sync Configurations for the custom objects in your production organization
- Open the 'Egnyte Sync Configuration' tab in your production organization and click on 'New' to create a new Sync Configuration record.
- Select the same custom objects you specified in step 1, but this time choose 'No' for the 'Auto-generate Trigger' setting. You need to enter the name of the apex triggers and test classes that were deployed from the sandbox environment.
- After specifying the triggers and test classes for custom objects, select 'Continue' then 'Process' to generate the Sync configurations for the selected custom objects. Note that you can always change settings related to the configurations from the 'Egnyte Sync Configurations' tab in your production organization.