if will give current .update in before business rule , what will be happen?

ram2497
Tera Contributor

if will give current .update in before business rule , what will be happen?

1 ACCEPTED SOLUTION

Omkar Mone
Mega Sage

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

find_real_file.png

www.dxsherpa.com

View solution in original post

5 REPLIES 5

Runjay Patel
Giga Sage

Check out this video, it will clear all your doubts and help you to understand Business Rule queries in details.

Link: https://www.youtube.com/watch?v=hLottNnk21U&ab_channel=ServiceNowHelpdesk

It help you to understand below points.

  • Scenario based business rule uses
  • Best business use cases for all types of business rules
  • Current .update in before business rule
  • Difference between Before BR and Before query BR?
  • Where can we use query business rule?
  • All type of business rule with real world scenario
    • Before
    • After
    • Async
    • Display

 

Please mark reply as Helpful/Correct, if applicable. Thanks!!