Refreshing a Developer Sandbox in Salesforce allows you to update its metadata to reflect the current state of your production organization, ensuring your development environment is synchronized for accurate testing and development.
Refreshing a Developer Sandbox is a straightforward process that overwrites your existing sandbox with a fresh copy of your production organization's metadata. This action is crucial for maintaining an up-to-date development environment, allowing you to work with the latest configurations, custom objects, fields, and code from your production org without affecting live operations.
Steps to Refresh Your Developer Sandbox
Follow these steps to refresh your Developer Sandbox in Salesforce:
-
Navigate to Sandbox Setup:
- From Salesforce Setup, use the Quick Find box to search for
Sandboxes
. - Select Sandboxes from the results.
- From Salesforce Setup, use the Quick Find box to search for
-
Initiate the Refresh Process:
- On the Sandboxes page, locate the Developer Sandbox you wish to refresh.
- Next to the name of your sandbox, click the Refresh link.
-
Review and Configure Refresh Options:
- A refresh wizard will appear. Review the Name and Description fields. You can edit these values if needed.
- The Create From field will display your production organization, indicating that the sandbox will be refreshed from its metadata.
- Select Sandbox Type: Ensure that "Developer" is the selected sandbox type. Developer Sandboxes are primarily for isolated development and testing, copying only your production organization's metadata. Note: Unlike Full or Partial Copy sandboxes, Developer Sandboxes do not copy production record data.
- Select Data: For Developer Sandboxes, this step primarily concerns metadata. You won't be selecting specific production data records to copy.
-
Confirm and Start Refresh:
- Review all settings.
- Click Refresh to initiate the process.
-
Monitor Refresh Status:
- Salesforce will begin the refresh process. The time it takes varies depending on the amount of metadata in your production organization.
- You will receive an email notification once the refresh is complete, containing a link to access your refreshed sandbox.
Key Considerations for Developer Sandbox Refreshes
Understanding the implications and best practices for refreshing Developer Sandboxes is essential for an efficient development workflow.
- Refresh Frequency: Developer Sandboxes can be refreshed every one day. This frequent refresh capability makes them ideal for agile development cycles where keeping environments in sync with production's metadata is crucial.
- Data Implications:
- Metadata Only: Developer Sandboxes only copy your production organization's metadata (configurations, custom objects, fields, Apex classes, Visualforce pages, etc.). They do not copy any record data from production.
- Post-Refresh Data: After a refresh, your Developer Sandbox will be devoid of production data. You'll need to manually create test data or use tools like Salesforce Data Loader, Salesforce CLI, or third-party data seeding tools to populate it with relevant test records.
- Overwrite Existing Sandbox: Refreshing a sandbox completely overwrites its existing content. Any data, metadata changes, or customizations made directly within the sandbox since its last refresh will be permanently lost unless they were deployed to production or backed up elsewhere.
- Post-Refresh Actions: After a successful refresh, you'll typically need to perform several post-refresh tasks:
- Activate Users: New users from production will need to have their sandbox access enabled.
- Update Endpoints: Reconfigure any integrations or API callouts that point to external systems, ensuring they target sandbox-specific endpoints.
- Re-authenticate Integrations: Re-establish authentication for any connected apps or third-party integrations.
- Install Packages: Reinstall or update any managed or unmanaged packages used for development or testing.
- Deploy Test Data: Load necessary test data if your development requires specific records.
Understanding Sandbox Types and Refresh Intervals
Salesforce offers different sandbox types, each designed for specific purposes and with varying refresh intervals and storage capacities. Developer Sandboxes are tailored for individual development and unit testing.
Sandbox Type | Purpose | Refresh Interval | Data Copied | Storage Limit |
---|---|---|---|---|
Developer | Isolated development, unit testing | 1 day | Metadata only | 200 MB |
Developer Pro | Larger development, QA, integration testing | 1 day | Metadata only | 1 GB |
Partial Copy | QA, UAT, staging with sample data | 5 days | Metadata + Sample production data | 5 GB |
Full Copy | Performance testing, load testing, full UAT, staging | 29 days | Metadata + All production data | Same as production |
Refreshing your Developer Sandbox is a fundamental process for maintaining an agile and effective Salesforce development environment. By understanding the steps and key considerations, you can ensure your sandbox accurately reflects your production organization's metadata, facilitating robust development and testing.
For more detailed information on Salesforce Sandboxes, refer to the official Salesforce documentation: Salesforce Sandboxes