Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to capture changes in a particular update set?

Prithvi Ramesh1
Mega Sage

Is there a way to capture the changes into a particular update set? As I am already aware that with the below script, we can capture the changes in the current update set:

 

var rec = new GlideRecord('sys_script_include');

rec.get('3746f334879755503662fff4dabb3523');

new GlideUpdateManager2().saveRecord(rec);

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Prithvi Ramesh1 

yes that is used when record is not captured in update set such as scheduled job, scheduled report etc

Why not select the correct update set and then capture that script include?

It will get captured in your selected update set.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Sheldon  Swift
ServiceNow Employee
ServiceNow Employee

Hi @Prithvi Ramesh1  - What’s the use case? I’m not sure why you’d need to, but I suppose you could capture the changes in the current update set, then look at the relevant Customer Update [sys_update_xml] records and change the Update set field. In practice though, I would simply switch to the target update set and then make the change.