This article provides a short explanation of Sandboxes in general and describes how to refresh a Sandbox.
I. Sandboxes explained
Depending on the type of Sandbox, it can be refreshed once a month (Full-copy), once a week (Partial) or once every day (Developer).
Every Production org has 25 Developer Sandboxes available. This type of Sandbox can be refreshed once per day and will only copy the metadata from the Production org. Data that was entered on this Sandbox is deleted after a refresh. The users on the Sandbox are an exact copy of the users on Production, which also means that the passwords are the same as that of Production. To log on to a newly created or refreshed Sandbox, go to https://test.salesforce.com and add the name of the Sandbox (.sandboxname) after your Production username. Bullhorn does not support this type of Sandbox.
Every Production org has 1 Partial Sandbox available. This type of Sandbox can be refreshed once per week and will copy all metadata, but only a sample of the data up to a maximum of 5 GB of the Production org. The maximum file storage on a Partial Sandbox is also 5 GB. The users on the Sandbox are an exact copy of the users on Production, which also means that the passwords are the same as that of Production. To log on to a newly created or refreshed Sandbox, go to https://test.salesforce.com and add the name of the Sandbox (.sandboxname) after your Production username. Bullhorn does not support this type of Sandbox. For more information about Partial Sandboxes and the template we advise you to use for this type of Sandbox, please read this article.
A Full-copy Sandbox is only available when this is requested via your account manager. This type of Sandbox can be refreshed once every 30 days and will copy all metadata and all data from the Production environment:
- The Sandbox has the exact same configuration as Production
- The Sandbox contains the exact same data as Production (Jobs, Candidates et cetera)
- The users on the Sandbox are an exact copy of the users on Production, which also means that the passwords are the same as that of Production.
To log on to a newly created or refreshed Sandbox, go to https://test.salesforce.com and add the name of the Sandbox (.sandboxname) after your Production username. As mentioned above, the password is the same as that of the Production environment.
"Full sandboxes are intended to be used as testing environments. Only Full sandboxes support performance testing, load testing, and staging. These environments are a replica of your production organization, including all data—for example, object records and attachments—and metadata."
Salesforce Help pages:
- Create, Clone, or Refresh a Sandbox | Salesforce
- Sandbox Overview | Salesforce
- Sandbox Licenses and Storage by Type | Salesforce
- Create or Edit Sandbox Templates | Salesforce
II. Refresh Actions
1. Log on to your Production org and go to Salesforce Setup - Sandboxes. There you will see an overview of the Sandboxes that are available to refresh. Choose the Sandbox you want to refresh (if there is more than one Sandbox) and click on Refresh.
2. On the page shown in the screenshot below you need to name the Sandbox and you can give the Sandbox a description. Click on Next on the bottom of the page in the column of the desired Sandbox you want to refresh.
3. The following page, as shown in the screenshot below, allows you to choose which data is copied. For Full-copy Sandboxes we advise you to use the same settings as shown in the screenshot. If you are refreshing a Partial Sandbox, you are required to create a template first and choose Template-based in stead of All. As of Release 8 you need to enter SandboxRefresh in the field Apex Class to make sure a script is run that automatically changes settings that are needed. Then click on Create.
4. The Sandbox will now be created, which can take some time, depending on how many requests are being processed by Salesforce. When the Sandbox is created, you will receive an email that the Sandbox needs to be activated. Log in to the Production org and go to Salesforce Setup - Sandboxes, click on Activate (which is shown in stead of Refresh) and wait until the Sandbox is activated. You will receive an email as soon as the Sandbox is ready to use.
5. The script that was activated by the Apex Class used in Step 3 performs some refresh actions automatically, for example changing the edition key to the correct one. Log in to the Sandbox and check if the Edition has been changed by opening the page Connexys Setup (or Connexys Resource Manager Setup). The edition should not be Light or Starter. The following actions are performed by the script:
- Edition key is set to the correct one (Connexys only setting)
- ORG ID is changed in the application settings (Connexys only setting)
- Site URL is changed in the application settings (to match the URL in Salesforce Setup - Develop - Sites)
- Mimir credentials changed to test credentials (Connexys only setting)
- Job alerts are deactivated
- Remote site setting is created for the new Site URL
- The application form URL is changed to match the new Site URL (only if there is no workflow rule or any other custom config on the org which changes the application URL)
In addition, as of Release 8 the Textkernel settings are automatically changed to the staging settings (test environment) after refreshing a Sandbox.
6. If you use our standard Application Form URL, the URL is changed to that of the Sandbox automatically (see action 7 in Step 5). If you use a custom URL you will need to transform the site URL that is used in the Application URL. If you don't change it, a test job application will be entered into the Production org. You can change it by using Data Loader and exporting two fields on the Job object: ID and the field you need to update. Transform the URL in CSV, Excel or Open Office by replacing the Production Site URL by that of the Sandbox environment and perform an update with Data Loader (always perform the update with both fields).
A custom URL can be created by updating the field with a workflow rule or by using a custom field. When you use a workflow rule, you need to change the field update first before you update the field with the transformed URL. When you use a custom field, Make sure you change the value of the field before performing the update.
7. We also advise you to update the email addresses of all candidates to a no-reply address to make sure they don't receive any emails by mistake during testing. This can be done with Data Loader as well. Export two fields on the Candidate object: ID and email address. Transform the email addresses to a no-reply address in CSV, Excel or Open Office and update the Candidate records (always perform the update with both fields).
It is also possible to change the email deliverability in the Salesforce Setup if you want to make sure no emails will be sent.
8. To view documents in the document preview that were uploaded after the Sandbox has been refreshed, you need to add the following remote site setting: http://acceptatie.connexysmatching.com. You can name it MatchingAcceptatie. Remote site settings can be found in the Salesforce Setup under Security Controls. It is easier to add the URL to the Production environment so that it will automatically be added after a Sandbox refresh.
9. If the script mentioned in Step 3 hasn't executed correctly, there is the possibility to execute the script manually via the Developer Console. Open the Developer Console on the Sandbox and then open the Execute Anonymous Window in the dropdown Debug. Paste the following script:
cxsrec.SandboxRefresh sr = new cxsrec.SandboxRefresh();
Make sure the ORG ID of the Sandbox is entered on the place of ORG_ID and the Sandbox name on the place of SB_NAME. You can then click execute and the script will run.