We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

business rules is not working without current.update

krishnaredd
Tera Contributor

insert and update business rule not working without current.update syntax in servicenow

9 REPLIES 9

WHy cant you do the same in a Before BR?

-Anurag

We tried this method also, but we are getting below error while we are performing update set scan activity on this BR.

Error: remove current.update line from BR

We tried the things as per ServiceNow suggested KB article also, but functionality is not working as expected.

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0715782

You don't need current.update when you use before BR, you can just comment that one line and leave rest as is, it will work.

-Anurag

Hi @krishnaredd ,

 

No need to use current.update(); in Business Rule for before -Insert/update the current record.

 

so, to update the current record field then

 

first check the condition then,

current.field_name=' update the value'; // backend value to the variable or create a sys_properties hardcode value there and call ,  and assign to the current field.

 

 

Instead of using current.update(), you can directly use current.setValue() to modify fields in the current record. 

javascript
current.setValue('field_name', 'value');

This avoids the need for current.update() and achieves the required result while preventing potential recursion or performance issues.