After Insert business rule causing unknown activities on Catalog Task.

The Matrix
Tera Contributor

Hi Team, 

There is an After Insert business rule written on Catalog Task (sc_task) for some reason it cannot be avoided and must be used with current.update(). This Business rule is causing unknown activitiy on Catalog Task as Active fasle.  What could be the reason for this?

 

 

TheMatrix_1-1771510726581.png

 

9 REPLIES 9

Mohit 101
Tera Contributor

Hi @The Matrix ,

 

The issue is most likely caused by using current.update() inside an After Insert Business Rule on the Catalog Task (sc_task) table.

When current.update() is used in an After Business Rule, it forces the record to update again immediately after being inserted. This triggers all related Update Business Rules, Flows, Workflows, SLAs, and other automation on the table. As a result, additional logic may run that changes the record’s state.

In ServiceNow, the Active field is system-controlled and automatically becomes false when the task state changes to a closed or completed state. If any other Business Rule or automation updates the state during that forced update, the platform will automatically set Active = false.

Using current.update() inside After Business Rules is not recommended because it can cause:

Recursive updates

Unexpected field changes

Performance issues

Uncontrolled triggering of other automation

The correct approach would be to move the logic to a Before Insert Business Rule if possible. In a Before Business Rule, field values can be modified directly without calling current.update(), which prevents unintended side effects.

So the actual root cause is that the extra update triggered by current.update() is activating other automation that changes the task state, which in turn automatically sets Active to false.

 

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for.

Thank You

 

 

Zach Koch
Giga Sage

I don't know of any business rule that requires current.update(). It explicitly not to be used in business rules. Could you post a screenshot of the business rule? Without context, it could be causing the active flag to change for many different reasons.

If this information helped resolve your issue, please remember to mark response correct and thumbs up to help future community members on this information, thanks!

HI @Zach Koch Basically the BR is utilised to Auto Assign Catalog Task to  specific assignment group and specific assign to user. 

TheMatrix_0-1771512364684.png

 

If you update the values of the current record (your current object), even in an After business rule, you don't call current.update(). The Business rule will set any Current field changes that are set in it automatically, just like a before business rule. What is your state of 2 on your Catalog Task? This could certainly be caused by using current.update().

If this information helped resolve your issue, please remember to mark response correct and thumbs up to help future community members on this information, thanks!