- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2022 07:04 AM
Hello
I want to update the current record using async business rule/after
I read that I must use
current.update()
current.setWorkFlow(False);
Can someone help what is happening behind when we set the workflow to false?
Thanks
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2022 07:09 AM
When you call current.setWorkFlow(false) you would want to call that before you call current.update().
This method will prevent additional business rules from firing against the current record based on the update you are about to perform. This is used to "end" the business rule processing stack and to prevent your update from triggering a circular round of updates that might otherwise result in a never-ending loop(recursive loop).
I hope this helps!
If this was helpful, or correct, please be kind and mark the answer appropriately.
Michael Jones - Proud member of the GlideFast Consulting Team!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2022 07:09 AM
When you call current.setWorkFlow(false) you would want to call that before you call current.update().
This method will prevent additional business rules from firing against the current record based on the update you are about to perform. This is used to "end" the business rule processing stack and to prevent your update from triggering a circular round of updates that might otherwise result in a never-ending loop(recursive loop).
I hope this helps!
If this was helpful, or correct, please be kind and mark the answer appropriately.
Michael Jones - Proud member of the GlideFast Consulting Team!
Michael D. Jones
Proud member of the GlideFast Consulting Team!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2022 07:20 AM
Many thanks for quick response!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2022 07:10 AM
The serWorkflow() method accepts one argument: a boolean true/false value. This argument will determine whether business rules should be triggered by any database actions performed by your GlideRecord script. For example, if you make a change and call the update() method, calling setWorkflow() and passing in false will prevent any business rules that would normally be triggered by that update from running.
Anshu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2022 07:20 AM
Many thanks for quick response!