//get entire url:
var instanceURL = GlideTransaction.get().getRequest().getHeader("referer");
//get bit of a url:
var surl='https://dev.service-now.com/hr/case_detail.do?sysparm_case=210ebaf74f82ef00aaa42c518110c7a9&sysparm_newcase=true&sysparm_nameofstack=250efaf74f82ef00aaa42c518110c705';
//--bit between 'sysparm_newcase' and '&'
var testRE = surl.match("sysparm_newcase=(.*)&");
gs.print(testRE);
var instanceURL = GlideTransaction.get().getRequest().getHeader("referer");
//get bit of a url:
var surl='https://dev.service-now.com/hr/case_detail.do?sysparm_case=210ebaf74f82ef00aaa42c518110c7a9&sysparm_newcase=true&sysparm_nameofstack=250efaf74f82ef00aaa42c518110c705';
//--bit between 'sysparm_newcase' and '&'
var testRE = surl.match("sysparm_newcase=(.*)&");
gs.print(testRE);
Comments
Post a Comment