Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Is there a way of getting a list of plugins which require an update in LIST view?

Chaz_
Tera Guru

Hi,

 

I am hoping to have some sort of alert which can alert me when a plugin is available for an update. I know that this can be viewed from the plugins page, but this UI means that you have to visit this page manually.

 

Is there a list view of the same page which shows which plugins require an update? I am hoping to build a scheduled report to alert me when there are updates available? Or is there some better way of tracking when updates to plugins are available?

 

Thanks.

1 ACCEPTED SOLUTION

And here an example of a Scan Check which could find newer store application versions.

 

MarkRoethof_0-1696445864101.png

(function (engine) {

	// Define variables
	var table_name = 'sys_store_app',
		encoded_query = 'active=true';

	// Query record
	var grRecord = new GlideRecord(table_name);
	grRecord.addEncodedQuery(encoded_query);
	grRecord._query();

	// Create scan finding
	while(grRecord._next()) {
		if(grRecord.version != grRecord.latest_version) {
			engine.finding.setCurrentSource(grRecord);
			engine.finding.increment();
		}
	}

})(engine);

 

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

15 REPLIES 15

Thanks for the code!  It worked like a charm.

I added a few lines to add fields from the app to the scan_finding record to make it easier to use.

(function (engine) {

	// Define variables
	var table_name = 'sys_store_app',
		encoded_query = 'active=true';

	// Query record
	var grRecord = new GlideRecord(table_name);
	grRecord.addEncodedQuery(encoded_query);
	grRecord._query();

	// Create scan finding
	while(grRecord._next()) {
		if(grRecord.version != grRecord.latest_version) {
			engine.finding.setCurrentSource(grRecord);
			engine.finding.increment();
			
			// add info to the 'finding_details' field of the [scan_finding] record
			var appName = grRecord.name;
			var appID = grRecord.scope;
			var currentVersion = grRecord.version;
			var latestVersion = grRecord.latest_version;
			var findingRecord = engine.finding;
			findingRecord.setValue('finding_details', "Name: " + appName + "\nID: " + appID + "\nCurrent version: " + currentVersion + "\nLatest version: " + latestVersion);
		}
	}

})(engine);