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

Jay_Ford
Kilo Guru



if(current.sys_updated_by.changes() && current.sys_updated_by == gs.getUserName()){
u_updated_by_customer_= true;
}
else{
u_updated_by_customer_= false;
}


lokesho
Kilo Explorer

still no luck..:( not working..:(


Not applicable

Try it with
current.u_updated_by_customer_= true;
and
current.u_updated_by_customer_= false;

And make sure the BR runs before Insert/Update


So I forgot the current. in my last post. But I think if you named the field 'Updated by customer' then the resulting db name would be u_updated_by_customer without the trailing underscore.



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