Add record to a specific update set from script

Nuno Oliveira
Mega Guru

Hi guys,

 

I have this requirement that asks me to create a record and add automatically to a specific update set. All this from a script include. 

Is this possible? 

I already know the GlideUpdateManager2 api, however, I don't if there is a way of accomplish this in this api.

Can someone help me with this?

 

Example:

var gr = new GlideRecord('sys_user');
gr.initialize()
gr.user_name = "xpto";
gr.first_name = "xpto";
gr.last_name = "otpx";
gr.insert();

var us = new GlideUpdateManager2();
us.saveRecord(gr);
 
However in this way it will add the record to the current update set, and the requirement is to add it to another update set.

 

Thanks in advance.

 

Best regards

 

3 REPLIES 3

-O-
Kilo Patron
Kilo Patron

The GlideUpdateManager2 constructor has an override that accepts one argument: the sys_id of the Update Set to add to.

Forget it; unfortunately not usable from Rhyno. 😞

Hi there.

 

Yeah, it's not possible now, I already tried that and it didn't work.

But do you know where I can get the documentation for that API?

 

Thanks in advance.

I don't believe that any of it is documented.