We have couple of outbound messages linked under the workflow rules and all these outbound message will send some of custom objects data and standard objects data to external systems everytime any kind of DML operation happens on these objects.
Everything got set up and working as expected. But recently we have come across a situation where all the outbound messages are pushing data from sandboxes to same external systems assuming that we forgot to disable these workflow rules in sandbox before we activate it and somehow we missed to change the outbound messages end point from production to sandbox.
Because of all these things the sandbox data got messed up with the production data. So, we started exploring the options how can we stop all these Workflow rules automatically in sandbox or can we change the endpoint from production to stage automatically after refreshing the sandbox.
As a solution we come across multiple options but as a quick fix we have chosen to use the below solution.
1. Identify the environment like sandbox or production.
- Use the username to identify this assuming we will add sandbox name in the end of username but in production we will not have any name after email Id.
- Use the SOQL to identify the environment
Please comment or write us if you have any queries/requirements.
Please like,follow,bookmark,subscribe this site to receive daily updates.
LinkedIn Group - Srinivas4sfdc (I Love Coding... You?)
FaceBook Page - I Love Coding. You?
Please like,follow,bookmark,subscribe this site to receive daily updates.
No comments:
Post a Comment