Need to set a flag in incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2013 11:58 AM
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;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2013 03:35 PM
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;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2013 10:57 AM
Thanks a lot Jay Ford and Laurens Brand. This worked perfectly...:)