Thursday 2 December 2021

Salesforce : Refreshing A Sandbox

WHAT IS SANDBOX?

Sandbox is the testing environment for your production environment. You can create different types of sandbox environments, or different copies of the same type to fulfill different purposes, such as development, testing, training, or UAT.


The Sandbox environment is isolated from the production environment. So, you can test as per need without affecting the production environment.


Salesforce provides 4 types of sandbox.

 1. Developer Sandbox
 2. Developer Pro Sandbox
 3. Partial Copy Sandbox
 4. Full Sandbox



WHY WE NEED TO REFRESH SANDBOX?
It is important to have accurate data while testing, development and training because its gives us confidence that configuration or code will not break the production environment. So, sandbox environment should be the mirror of the production environment as closely as possible.

The Salesforce Development Lifecycle Guide recommends that we should refresh/update our sandboxes on a regular basis to ensure that they have the most up-to-date setup and data.

WHAT IS SANDBOX REFRESH?

Refreshing a sandbox means updating all sandbox’s metadata from source org. If the sandbox is a clone or contains a template, the refresh process updates the org’s data and its metadata.

SANDBOX REFRESH PROCESS

At the time of refreshing, the salesforce creates a new org that contains all the objects, fields, validation rules, page layouts, record types, users, and so on as source org.

The sandbox based on template, partial copy, and full copies get some/all data from a source. Here, data refers to records.

SANDBOX REFRESH BEST PRACTICE

Refresh process builds all configuration like source org and remove current org configuration. As the current configuration will be lost, we need to make sure to have pre and post action document that we can compile and revert it after refresh if any issue arises.

In the document, you can include the below points. 
  • Scheduled jobs
  • Deliverability
  • Named Credentials
  • Custom Settings
  • Custom Metadata Types 
  • Remote Site Settings
  • Managed package configurations
  • Connected Apps
  • Apex Exception Email
  • Hardcoded values both in Apex and declarative tools
  • User credentials used in the integrations
  • Salesforce apps and their configurations
After the completion of refresh, we can compare and revert it back from the document.

If you have any questions you can reach out our Salesforce Consulting team here.

No comments:

Post a Comment