How can I force changes to an Scoped Application UpdateSet?

Vinicius
Kilo Contributor

Hello Everybody,

 

I want to know if there's a way to force changes to an Update Set built in Scoped applications.

I got this code to use in Background Scprit

//Query for the record
var rec = new GlideRecord('sys_ui_section');
rec.get('116b367b6feecf406bda17164b3ee42c');
//Push the record into the current update set
var um = new GlideUpdateManager2();
um.saveRecord(rec);

 

It's nice but only works for Update Sets in Global. The main issue is the method GlideUpdateManager2().

Can you guys help me out here? Thanks in advance.

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

Hi,

 

Tested the same as below.

1. Created Update set in Human Resources : Core Scoped application

2. Ran a background script as below.

var rec = new GlideRecord('sys_ui_section');
rec.get('6fb3e037b73333001d69c2daee11a907');
//Push the record into the current update set
var um = new GlideUpdateManager2();
um.saveRecord(rec);

3. It got forcefully captured in update set as below.

find_real_file.png

 

View solution in original post

7 REPLIES 7

Jaspal Singh
Mega Patron
Mega Patron

Hi,

 

Tested the same as below.

1. Created Update set in Human Resources : Core Scoped application

2. Ran a background script as below.

var rec = new GlideRecord('sys_ui_section');
rec.get('6fb3e037b73333001d69c2daee11a907');
//Push the record into the current update set
var um = new GlideUpdateManager2();
um.saveRecord(rec);

3. It got forcefully captured in update set as below.

find_real_file.png

 

find_real_file.png

This is what I got

Try executing the same in Global scope as below.

find_real_file.png

In this case it gets captured in an Update set but the Application says its "Global" so the system will not allow us to move ahead with the publish of the application.