Checklist for refreshing a sandbox from your production org in Salesforce

If you are a sfdc admin or developer, sandbox refreshes are a normal part of your life. The question is what are things needed to be done when you do a sandbox refresh prior to refresh or after the sandbox refresh. I could not find an answer for this as each company has its own way of things on sandbox refreshes.  I want to thank Carol Enevoldsen and Ben Lorenz for their contribution on a question to an answer in the success community  which made me to create this blog.  😀

  1. Before refresh.
    1. Communicate proposed schedule/timeline to impacted audience including integration teams, development teams who might be doing any testing on your full copy or other sandboxes.
    2. Full sandboxes can only be refreshed every 29 days.
    3. For full sandboxes plan for a minimum of 48 hours as the timing of the refresh is dependent on the salesforce Queue and also amount of data.
    4. If you have multiple lines of business using one salesforce org, create a sandbox template for each business depending on business requirement.
    5. For full copy  sandboxes contact premier support in advance  to identify place in refresh queue in order to get a better perspective on expected timing/completion of the data copy.
    6. Perform a full metadata backup of the instance being refreshed. If you do not have a back up tool, it is very important to get a backup of your sandbox. You can do this using eclipse if you have development teams. If you do not have developers, use the Data export feature to at least do a weekly export of your salesforce data.
    7. If you are using ant scripts, you can use the below xml file to backup all your data.

    8. Activate the new or refreshed sandbox after the sandbox is refreshed.
  2. After refresh.
  1. Update sandbox SSO certificate if you have a certification and  send new URL details to identity team.
  2. Un schedule scheduled apex, reports and dashboards. This would prevent unwanted batch jobs to run on the sandbox and perform any mass operations. Now for testing, you can run the jobs manually if needed.
  3. Re-schedule Jobs, Reports or Dashboards
  4. Update URLs in Custom Settings like the below example to avoid any unwanted data post to production applications.
    1. endpoints__c
      1. someEndpoint –
  5. Update URLs in Custom Labels
  6. Update URLs in VF pages if there is any hard coded urls.  ( really, you should move these to custom settings or custom labels)
  7. Update URLs in formula fields .
  8. Update URLs in other static content.
  9. Disable Chatter notification for users.
  10. Provide new endpoints/credentials to integration team or other systems for testing in development environments. This is important to prevent unwanted data posts to production applications.
  11. Set Deliverability for email access — Setup / Deliverability / Access level = System email only.
  12. On your home page, Update message area to differentiate between production and sandboxes.
  13. If you  have consultants in your sandbox which you have to create every time after the sandbox refresh,create them as read only users in production. This way after you refresh sandbox, you can easily update them in sandboxes to give them access. Otherwise you will have to recreate these users every time which is a waste of time.

For partial and development sandboxes.

  1. If your sandbox is other than full or partial copy, do the following
    1. Migrate Custom Setting Data so that you can have data for testing.
    2. If you have Custom Objects which has static data, please reload them using data loader.

Handling Emails.

  • Update Global Email Deliver-ability.
  • Update Email addresses for Users to prevent accidental emails.
  • Update email addresses in Custom Settings
  • Update email addresses in Custom Labels
  • Update hard coded emails in Workflow Email Alerts
  • If you have email address fields  in Standard and Custom Objects, the below apex class would help to update them in one shot to null!! 🙄
    1. Please copy the below apex class to your sandbox.
    2. Execute batch commands for each object you wish to update emails.

Apex Class code for batch update of email addresses in Standard and Custom sObjects

To execute this batch code, you can use the following syntax on your IDE or dev console where you can execute under anonymous window.

Some No-No’s.

  • Do not plan your sandbox refresh during Salesforce spring, summer and winter release dates and times.
  • Do not do sandbox refreshes during your regular development times. This would create double work on the team.

Please feel free to post your comments on the below post. I also have a checklist which i can share with you as well. Feel free to email me at for any further questions.


Hi there! My name is Buyan Thyagarajan. I am a Salesforce consultant specializing in Higher Education, Manufacturing and Marketing Automation. My blogs will help you to maximize your Salesforce CRM investments, prevent problems beforehand and make the right decisions. If you need to talk to me right away, you can email me at or call me at 302-438-4097

Leave a Reply

Your email address will not be published. Required fields are marked *

Get free tips on Salesforce
Get free tips on Salesforce
We respect your privacy.