Image of Mike Gerholdt and Gordon Lee for our "How I Solved This" video series.

How I Solved This: Test Flows and Processes Without Updating Live Data

By

Watch Gordon walk us through his innovative solution in the “How I Solved This” video series, and read all the details in the post below.


Key business problem: 

As a Salesforce Admin, I want to run my flows and processes without messing up live data. I always test and debug in a sandbox, but sometimes I need a Production instance with data for testing, and I don’t want to edit real records.

How I solved it:

I created a custom text field, called AdminFlag, that’s only visible to System Admins and for each object I interact with most. This is essentially a dummy field that you, as the Sys Admin, can update without worry. You should create one for each object as needed — I’ve found that having one for Accounts, Contacts, and Opportunities covered most use cases. In some objects, I needed more than one, so I created AdminFlag1, AdminFlag2, etc. 

Example:

1. Create the text field and make it visible only to Sys Admins.

2. Add it to the record’s Page Layout. 

  • If you don’t already have a dedicated Sys Admin page layout, I recommend creating a new section at the top of the page with the AdminFlag field(s). 
  • Since it’s the only field(s) in the section and only visible to Sys Admins, other users won’t see the section either. This allows for a quick audit of individual records without your users knowing the field is there!

3. Take it for a spin!

Here’s an example of using it as a dummy field in a process builder. Let’s say you need to check a complicated formula’s logic in production. Copy the formula over as a new immediate action and set the update to your AdminFlag field with some text you can audit quickly, such as “I hope this PB worked!” 

If the field updates, then your automation checks out. If it doesn’t, then you know where to start in your troubleshooting process. 

Business results:

This has made admin life much easier for my team. The end users don’t know it’s there. And, it’s allowed us to test, verify, and audit items much more quickly which, in turn, decreases our turnaround time for requests. End users happy? ✅ Admin Team happy? ✅✅ Everyone happy? ✅✅✅ 

Do try this at home

This example was real and it’s very simple. But the principle behind it could be applied in all sorts of ways. Let your imagination run wild! 

Flows, validations rules, and workflow rules

You can use the same concepts and principles to verify your flows, validation, and workflow rules as well. I’ve found this especially useful for checking formulas involving multiple nested IF statements and the I-never-remember-which-one-to-use ISBLANK() vs. ISNULL() functions. 

Additional considerations

Depending on your object, make sure that updating the AdminFlag doesn’t also trigger other updates you don’t want to fire since you’re dealing with production data. The last thing you need is for this to cause a bigger problem than the one you were trying to solve. 

Let us know what you thought of this solution, and tell us how you want to use it with #AwesomeAdmins #HowISolvedThis.

Relevant Trailhead Modules

Want to see more good stuff? Subscribe to our channel!

SUBSCRIBE TODAY