Quantcast
Channel: ServiceNow Community - ServiceNow Scripting
Viewing all articles
Browse latest Browse all 208

Business rule not working

$
0
0

This is not working..i need to close the ticket not updated more than 3 days if it is in resolved state..12 is the resolved stae value and 3 is the closed complete value..i tried my best it not working..kindly help me on this..

Thanks in advance..

autoCloseEquip();

function autoCloseEquip(){
var ps = 3;
var pn = parseInt(ps);

if (pn > 0) {
var gr = new GlideRecord('u_equipment_engineering');
gr.addQuery('state', '12');
gr.addQuery('sys_updated_on', '<', gs.daysAgoStart(pn));
gr.query();
while(gr.next()) {
gr.state = '3';

read more


Viewing all articles
Browse latest Browse all 208

Trending Articles