Why does GlideUpdateManager2() work in a Business Rule but not in a Script Include or Fix Script?

Garrett
Kilo Expert

I am trying to push a single record from the rm_story table to my current update set using code. I want to use the following code:

find_real_file.png

 

When I put this code in a Business Rule it works great and logs that umResult = True. However, when I put this same exact code in a Fix Script or Script Include (both of which are in the same Scope and Application as the Business Rule), it does not work and logs that umResult = False.

 

1) Why is this happening? 

2) Is there any documentation for GlideUpdateManager2()? I can't find anything. I would like to see the base code for this.

 

Thanks

1 ACCEPTED SOLUTION

Garrett
Kilo Expert

So I figured out the problem with the Fix Script. Apparently, you have to set the field Unloadable to true in order for it to create updates. Once I checked this, the Fix Script started working.

View solution in original post

2 REPLIES 2

sachin_namjoshi
Kilo Patron
Kilo Patron

GlideUpdateManager2() is used to push record in your update set.

Please see use of GlideUpdateManager2() in below KB article

 

https://hi.service-now.com/kb_view.do?sysparm_article=KB0622391

 

REgards,

Sachin

Garrett
Kilo Expert

So I figured out the problem with the Fix Script. Apparently, you have to set the field Unloadable to true in order for it to create updates. Once I checked this, the Fix Script started working.