Refreshing a sandbox from production is a good practice that keeps both environments aligned. When a sandbox is refreshed, it synchronizes settings and metadata with production, and if the sandbox is a full or partial copy, records are synchronized, too. This allows for development and testing to be done in an up-to-date environment to reduce the risk of issues occurring when the changes are migrated into production.
This page is for users who already have Overcast installed in their production org.
In order to refresh a sandbox, you must navigate to Setup > Quick Find and search for Sandboxes
. Once there, you can select the Refresh action beside the target sandbox. Click here for the Salesforce documentation on sandbox refreshing.
Select all the Overcast package custom objects to include in the data copy so all Overcast Scenarios and configurations are retained.
No data is copied.
Overcast provides an Apex class that performs some package setup work.
In the Sandbox Options screen, which appears after clicking Next, enter into the Apex Class text box overcast.SandboxCloneScript
.
If you already have a class you intend to run here, add the following code snippet to your class:
void runApexClass(SandboxContext context) {
...
overcast.SandboxCloneScript overcastScript = new overcast.SandboxCloneScript();
overcastScript.runApexClass(context);
}
overcast.SandboxCloneScript performs the following operations
If you do not specify overcast.SandboxCloneScript in the refresh options, it is recommended to execute it manually in the sandbox.
Open the Developer Console and execute the following code:
overcast.SandboxCloneScript overcastScript = new overcast.SandboxCloneScript();
overcastScript.runApexClass(null);
Update Overcast settings
Update Overcast settings