Need to set a flag in incident

lokesho
Kilo Explorer

I have created a boolean field named Updated by Customer? (u_updated_by_customer_) on incident. I have to set the flag true if if the customer has last updated incident else false. I have created below business rule but unsuccessful. Can anybody help..?

if(current.sys_updated_by.changes)

{

u_updated_by_customer_= true;
}

else

{
u_updated_by_customer_= false;
}

6 REPLIES 6

If so the current.sys_updated_by.changes() condition will never be met. for testing I would just remove that condition and use.

This worked in the demosandbox(https://demo015.service-now.com) I tested it.



var uname = current.caller_id.user_name;
if(current.sys_updated_by == uname){
current.u_updated_by_customer = true;
}
else{
current.u_updated_by_customer = false;
}


lokesho
Kilo Explorer

Thanks a lot Jay Ford and Laurens Brand. This worked perfectly...:)