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

 

8 REPLIES 8

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!

yashkamde
Kilo Sage

Hello @The Matrix ,

The reason may be this that current.update() inside an after-insert rule causes a second update transaction, which re-triggers update rules and system logic one of those is setting active = false. The fix is either to restructure the rule to avoid current.update() at that timing, or to guard against recursion with flags/conditions.

 

If my response helped mark as helpful and accept the solution.