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

Scripted checking for new available plugin version

Mark Roethof
Tera Patron
Tera Patron

Hi all,

Haven't found it yet, so thought... let's post on the community 🙂

Any ideas if and how it would be possible, to check scripted, if there's a new version of a plugin available? For example see the below image where the current version is 23.0.7 while there are already 3 newer versions available.

find_real_file.png

Kind regards,
Mark

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

1 ACCEPTED SOLUTION

Harshad Wagh
Tera Guru

Hi Mark,

I dont know if we can get all the versions which are not installed but I was able to get the latest version with following script.

var versionGR = new GlideRecord("sys_store_app");
versionGR .addQuery('scope','sn_ex_sp');
versionGR .query();
if(versionGR .next())
{
if(versionGR .latest_version != versionGR .version)
gs.info("Latest Version : " + versionGR .latest_version);

}

View solution in original post

3 REPLIES 3

Harshad Wagh
Tera Guru

Hi Mark,

I dont know if we can get all the versions which are not installed but I was able to get the latest version with following script.

var versionGR = new GlideRecord("sys_store_app");
versionGR .addQuery('scope','sn_ex_sp');
versionGR .query();
if(versionGR .next())
{
if(versionGR .latest_version != versionGR .version)
gs.info("Latest Version : " + versionGR .latest_version);

}

That gave me a good lead! Never noticed that the latest_version was also on the record.

With knowing both fields, I now was able to create a nice Instance Scan Check.

Kind regards,
Mark

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Instead of me having to grind/build something - would you mind sharing that script?