Useful catalog client scripting for order guide to run on the cat item / catalog client script url params
https://docs.servicenow.com/bundle/orlando-it-service-management/page/product/service-catalog-management/concept/c_CascadeTheOrderGuideVariables.html
sample script:
function onLoad() {
//--July2020
//--if the item was loaded from an order guide
//--https://docs.servicenow.com/bundle/madrid-it-service-management/page/product/service-catalog-management/concept/c_CascadeTheOrderGuideVariables.html
//--may need revising if shifts into portal later
//var bOG=g_service_catalog.isOrderGuide();//--service portal friendly
try{
var gUrl = new GlideURL();
gUrl.setFromCurrent();
var sOG = gUrl.getParam("sysparm_guide");
if (sOG!=null){
alert('test:' + sOG);
}
//var item = $("current_item");
//var guide = $("sysparm_guide");
//alert(item);
//alert(guide);
}catch(ex){
//...
}
}
Comments
Post a Comment