Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Example: Apply New Workflow Rules to Existing Records
Imagine a scenario where you have just deployed new or revised Workflow Rules to satisfy business requirements. Perhaps you changed the entry criteria or maybe you changed what the Workflow Rules do when they run. Or maybe you just completed a data import and realized "Oh no! There's a bug in my Workflow Rules!" or "Oh no! My Workflow Rules were inactive and didn't run!"
Regardless, you now need to have existing records reprocessed so that the appropriate Workflow Rule logic applies.
The traditional approach involves exporting the existing records from Salesforce then re-importing them to cause an "update" so the Workflow Rules run. That's no fun :( Using Data Loader you need to have your computer on the whole time and maintain good internet connectivity. This can really put a hamper on your plans if you're trying to leave the office.
With Mass Action Scheduler you can reprocess those Workflow Rules on your existing records without exporting or importing any data. Everything happens in Salesforce even if you close your browser, shutdown the computer, and head out to meet your friends for dinner 👍
First, create a list view or report that identifies the source records you want to process. In this simple example I have some accounts without a
Type assigned, and per new business requirements whenever an account is created without a
Type then it should default to
Second, ensure the source records will meet the rule criteria of your desired Workflow Rules and that those Workflow Rules are active. In this simple example, our new Workflow Rule normally runs when records are created. However, we can force the Workflow Rule to re-evaluate existing records (the Evaluation Criteria is ignored, only the Rule Criteria matters).
Third, create a Mass Action Configuration record that ties the source and target action together with (optionally) schedule for how often to run this configuration.
After the action runs (e.g. manually by clicking the Run button or via the specified schedule) then confirm your records were updated accordingly.