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 Add Schedule reports In Update Set ServiceNow

mouna maatoug
Tera Expert

Hello,

 

I create a scheduled report and it works perfect.
when I push the update set to another instance, I found that the scheduled report is not captured in the update set.
So, I export the scheduled report to xml and set it to the second instance but it does'nt work.
what is the wrong? what can I do to correct? how can I add the scheduled report to the update set?

 

Thanks in advance.

1 ACCEPTED SOLUTION

mouna maatoug
Tera Expert

Hello, I find the solution 🙂
I put it here, it may be can help.

To add scheduled report in an update set, run this script in "System -->  System Definition --> scripts - background"
var gr = new GlideRecord('sysauto_report');
gr.addQuery('sys_id','bcfa71c8db7d5a10d46e5117f39619cf');
gr.query();
if(gr.next())
{
var um = new GlideUpdateManager2();
um.saveRecord(gr);
gs.print("record saved");
}

NB: _ replace the sysId with your reports sys_id.

       _ Make sure you are in the right current update set.

View solution in original post

1 REPLY 1

mouna maatoug
Tera Expert

Hello, I find the solution 🙂
I put it here, it may be can help.

To add scheduled report in an update set, run this script in "System -->  System Definition --> scripts - background"
var gr = new GlideRecord('sysauto_report');
gr.addQuery('sys_id','bcfa71c8db7d5a10d46e5117f39619cf');
gr.query();
if(gr.next())
{
var um = new GlideUpdateManager2();
um.saveRecord(gr);
gs.print("record saved");
}

NB: _ replace the sysId with your reports sys_id.

       _ Make sure you are in the right current update set.