The CreatorCon Call for Content is officially open! Get started here.

Pradyumna Das
Tera Expert

Run the below script to get all the reports that are not associated with any dashboard.

 

gs.info('Please find the below reports which are not associated with any dashboard');
gs.info('Report Title  --  Report on Table  --  SysID');
var grSysReport = new GlideRecord('sys_report');
grSysReport.addEncodedQuery("");
grSysReport.orderBy('null');
grSysReport.setLimit(100);
grSysReport.query();
while (grSysReport.next()) {
    var grSPP = new GlideRecord('sys_portal_preferences');
    grSPP.addEncodedQuery("name=sys_id^valueSTARTSWITH" + grSysReport.sys_id.toString());
    grSPP.orderBy('name');
    grSPP.query();
    if (!grSPP.hasNext()) {
        gs.info(grSysReport.title + '  --  ' + grSysReport.table + '  --  ' + grSysReport.sys_id); //
    }
}

 

Thank You,

Pradyumna Das

Version history
Last update:
‎08-10-2024 10:13 AM
Updated by:
Contributors