TIP OF THE WEEK: Salesforce Record Id Behavior in Sandbox & Trialforce
What happens to Salesforce Record Id (or Object Ids) when you refresh your sandbox from the production instance?
Refreshing your sandbox from a Production org in Salesforce will simply copy the Record Ids (ID field type) from your production to your Sandbox instance.
How does Trialforce Record Ids work?
Trailforce orgs are created by cloning a TrailForce Template org. TrailForce org records receive fresh record IDs, unlike Sandbox instances.
What does this mean when Designing Apps?
Even though it’s not recommended to store Salesforce Record IDs in text fields, certain scenarios will require you to save these Record Ids. An example would be when storing Record Ids in a custom setting. When designing apps or automation for customers, we need to ensure functionality is fully operational when creating a sandbox or a new user with a Trailforce Application.
Here are a few useful tips regarding Record Ids when designing Apps for Trialforce:
- If possible, it’s better to avoid storing Salesforce Record Ids in text fields when designing automation
- Consider updating text-field stored Record Ids by using login-flows or similar mechanism. This is to ensure correct Record Ids are being used when users install your App.
Want to learn more about cloning a sandbox? Read here.