Current.Update() in a OOTB Before type Business Rule of Major Issue Management application

jmmatas
Tera Expert

Hello devs, 

 

I encountered an Current.Update() in a Out of the Box Before type Bussiness rule (named MIM Candidate to Case) of the Major Issue Management application: 

 

JuanMiguel_0-1746016641698.png

 

 

Is this code correct? I was told that Current.Update() in a Before BR can cause errors. 

 

Regards

2 ACCEPTED SOLUTIONS

Ankur Bawiskar
Tera Patron

@jmmatas 

yes it's an OOTB business rule and has current.update() in before business rule.

This is not best practice which ServiceNow tells but you will find a lot of components which are OOTB which don't follow these best practices.

AnkurBawiskar_0-1746017266031.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

Sandeep Rajput
Tera Patron

@jmmatas This is super weird and not inline with the best practices. You should raise a case with ServiceNow support and bring this to their notice as this will cause multiple updates on the record.

View solution in original post

15 REPLIES 15

We're on Xanadu, and so is my PDI.

It seems then that was fixed in Xanadu version already. 

Apologies, there is a typo in the plugin. The correct one is Major Issues Management. 

Ah! That makes more sense. I don't have that one installed. 🙂

Devi D
Tera Expert

@jmmatas  Using current. Update() inside a "Before business rule" like in the example shown , is not recommended and can cause issues.

if you need to make changes to the record before its saved , just use current.setValue() , so that snow will save those changes automatically ..

 

disadvantages of using current .update is 

it will make recursive updates , duplicate writes and it can also negatively impact performance.