logo

NJP

ServiceNow retrieve a particular service catalog variable by its name and value

ServiceNow Blog · Jan 08, 2024 · article

ServiceNow retrieve a particular service catalog variable by its name and value

name (actually the variable sys_id)

value

var grMTOM=new GlideRecord('sc_item_option');

var sQuery='item_option_new=818596ea1ba37510af03dce0b24bcbffvalue=test@email.com';

grMTOM.addEncodedQuery(sQuery);

grMTOM.query();

if (grMTOM.next()){

gs.print(grMTOM.sys_id);

gs.print(grMTOM.value);

}

View original source

http://www.cloudminus89.com/2024/01/servicenow-retrieve-particular-service.html