- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2018 01:02 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2018 01:07 AM
Hi
Avoid using current.update() in a business rule script. Theupdate() method triggers business rules to run on the same table for insert and update operations, leading to a business rule calling itself over and over. Changes made in before business rules are automatically saved when all before business rules are complete, and after business rules are best used for updating related, not current, objects. When a recursive business rule is detected, the system stops it and logs the error in the system log. However, current.update() causes system performance issues and is never necessary.
Mark Correct if it helps.
Warm Regards,
Omkar Mone
www.dxsherpa.com

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2018 01:07 AM
Hi
Avoid using current.update() in a business rule script. Theupdate() method triggers business rules to run on the same table for insert and update operations, leading to a business rule calling itself over and over. Changes made in before business rules are automatically saved when all before business rules are complete, and after business rules are best used for updating related, not current, objects. When a recursive business rule is detected, the system stops it and logs the error in the system log. However, current.update() causes system performance issues and is never necessary.
Mark Correct if it helps.
Warm Regards,
Omkar Mone
www.dxsherpa.com

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2018 01:13 AM
Hi ram2497,
It's not recommended to use current.update() in before business rules because this is bad practice.
For example, using current.update() in before update business rule can lead to recursion.
But what is your business case? Maybe you need another solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2018 01:31 AM
Hello Ram,
If the Business Rule of yours runs before Insert or Update -> then, the system automatically does an update on the DataBase when the script runs - meaning that it doesn't need another current.update().
If you would like to read an interesting article about this topic, I would suggest you to review the following one:
"Never use current.update in a Business Rule" - https://community.servicenow.com/community?id=community_blog&sys_id=f12d66e5dbd0dbc01dcaf3231f961988 of Goran Lundqvist.
Best Regards,
Georgi Mavrodiev
IT Consultant
Do IT Wise Bulgaria
You may visit us in our Web Site: www.doitwise.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2020 03:43 PM
current.update() however is required in async business rules. Please refer to the following question I asked in the community and the answers I got: