Do you aware when you refresh your Salesforce sandbox (Developer, Developer Pro, Partial, Full), the instance Organization Id will be changed? It mean, when we refresh a sandbox, Salesforce will create a new sandbox with new Organization Id. When we activate the refresh sandbox, old sandbox will be deleted.
The same for the instance name (cs1, cs2, etc...) in the refresh sandbox, you may get the same instance or different instance, it depends on when you refresh it, remember Sandbox preview window.
In previous blog, we discuss using $Organization.Id in validation rule to make sure the rule only run in production instance.
BUT, be aware that Salesforce will automatically change the value of Organization Id in Validation Rule and Workflow formula when you use $Organization.Id formula of production instance.
Formula example:
Website = '' && $Organization.Id = '00D90000000KY45'
In the new sandbox refresh or create, Salesforce will update all Validation Rules and Workflows in the new sandbox to:
Website = '' && $Organization.Id = '00D90000000OWqj'
This mean, you need to update $Organization.Id value in the validation rules and workflows with Production Org Id again if you plan to make the rule or workflows not work for sandbox.
Reference: Sandbox Setup Tips and Considerations.
No comments:
Post a Comment