Skip to content

Instantly share code, notes, and snippets.

@codaroma
codaroma / sn-refresh-installed-apps.js
Last active June 19, 2024 04:27
ServiceNow script to update existing store applications
/**
* Find all store applications that have a newer version available
* exclude apps with compatibility issues
* create a batch install plan to update them to the latest version
* pass the plan to sn_appclient.AppManagerAPI.installBatch
*/
var result = (function () {
var storeApp = new GlideRecord("sys_store_app");
storeApp.addQuery("version", "ISNOTEMPTY", "");
@codaroma
codaroma / SimpleQueryAjax.js
Last active April 23, 2024 11:28
ServiceNow SimpleQueryAjax.js Script Include
/**
* Example usage
*
* function onChange(control, oldValue, newValue, isLoading) {
* if (isLoading || newValue == "") {
* return;
* }
*
* var ajax = new GlideAjax("SimpleQueryAjax");
* ajax.addParam(