- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2016 03:18 PM
We are attempting to retroactively update a batch of change records (about 2000) to populate a field that was developed as mandatory. No problem there, developed a background script.
Only problem is that the script appears to be triggering business rules left, right, and center upon the update() call. Which we don't want (one of the business rules is resetting all the approvals, a definite no-no).
Anybody have an idea on how to stop further business rule processing? Or trigger an update without business rule processing?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2016 03:28 PM
You want to try to add this tag to the script so that it doesn't update the Updated field, which should skip other business rules from kicking off.
gr.autoSysField(false); // so that the records don't have system updates
gr.setWorkflow(false); // so no business rules are run
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2016 03:28 PM
You want to try to add this tag to the script so that it doesn't update the Updated field, which should skip other business rules from kicking off.
gr.autoSysField(false); // so that the records don't have system updates
gr.setWorkflow(false); // so no business rules are run
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2016 08:06 AM
Thanks Van. Used gr.setWorkflow(false); and it worked like a charm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Important note, the correct method name is, plural:
gr.autoSysFields(false);
Details.. but without the 's' it will not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2016 05:51 PM
you can use setWorkflow(false) to prevent rules from firing.
