Getting sys_id of current update set from within a business rule

Steen RP
Tera Contributor

Hi.

 

In a business rule, I need to find out which update set is my current update set.

 

Is there any way to achieve this; doe ServiceNow store this information in a session property?

 

Any suggestion will be appriciated. 

 

Thanks 

Regards

Steen 

1 ACCEPTED SOLUTION

Pooja Mhaske
Mega Expert

Hi Steen,

 

you can also get the current update set sys_id using below script in global scope:

 

new GlideUpdateSet().get()

 

View solution in original post

3 REPLIES 3

Mike_R
Kilo Patron
Kilo Patron

It's stored in a User Preference called 'sys_update_set'

 

instanceNameservice-now.com/sys_user_preference_list.do?sysparm_query=nameLIKEsys_update_set&sysparm_view=

 

Example script usage:

var currentUpdateSet = gs.getUser().getPreference('sys_update_set');

 

 

Pooja Mhaske
Mega Expert

Hi Steen,

 

you can also get the current update set sys_id using below script in global scope:

 

new GlideUpdateSet().get()

 

Hi.

Thanks; that was simple 🙂