The CreatorCon Call for Content is officially open! Get started here.

Add records to update set, via script, within scoped app??

justinbayliss
Tera Expert

I am working with a scoped application. I have a record that has several related lists. I have a need to move the current record, and all related list records into an update set, for easy migration to other instances.

I am creating a UI Action on my primary table. I have the code for adding records into the update set using GlideUpdateManager2(); HOWEVER, this is not allowed to be used within a scoped application.

Does anyone have a solution, within a scoped application?

4 REPLIES 4

Brad Tilton
ServiceNow Employee
ServiceNow Employee

I don't think there's a scoped alternative to that API, and the only solutions I can think involve the global scope. You could create a global ui action, or you could create a globally scoped script include available to your application scope that calls the GlideUpdateManager2 API and acts as a passthrough.

Unfortunately, I don't think you're going to be able to do this all within a scoped application.

I am thinking this is what I will have to do. I sucks that I will have to include a separate update set for this. I was hoping for some sort of in scope solution. I wish they would allow me to package global files in my application. 

Javier Arroyo
Kilo Guru
Would making an update set for the scope application then adjusting just the items needed place them inside the scoped updateset, which can then be transferred to another instance as long as the app exists there. Or would creating a jump script that triggers the GlideManager2 do the job?

I would go with a script include in the global scope that allows you to access the api.