Business rule to check and uncheck when update is made by caller on incident

Kaustubh k
Tera Contributor

Hi All,

 

We have created a custom field in incident form u_user_comments_received

which is checked on condition: current.sys_updated_by == current.caller_id.user_name and business rule triggers when state is on hold and on hold reason is awaiting caller.

 

The BR runs and checks the checkbox when condition matches but when we change to other state on incident form the check box is always true.

 

The check box should only be true when condition matches and false when there is no match.

 

 

please let us know for any suggestions on the same.

 

Regards

Karan

 

1 ACCEPTED SOLUTION

Ankit Rawat
Giga Guru

Hi @Kaustubh k ,

 

Create a Before Update business rule. And in Filter Condition add State Changes.

 

Then in advance-

 

if (current.state == <on Hold backend value> && current.sys_updated_by == current.caller_id.user_name) {
current.u_user_comments_received = true;
}
else{
current.u_user_comments_received = false;
}

 

 

Please mark helpful and accept my solution if it is helpful.

 

Regards 

Ankit

 

View solution in original post

5 REPLIES 5

Ankit Rawat
Giga Guru

Hi @Kaustubh k ,

 

Create a Before Update business rule. And in Filter Condition add State Changes.

 

Then in advance-

 

if (current.state == <on Hold backend value> && current.sys_updated_by == current.caller_id.user_name) {
current.u_user_comments_received = true;
}
else{
current.u_user_comments_received = false;
}

 

 

Please mark helpful and accept my solution if it is helpful.

 

Regards 

Ankit

 

Thanks Ankit,

for checking and replying, it helped.

 

Regards

Karan

 

Your Welcome

Ankur Bawiskar
Tera Patron
Tera Patron

@Kaustubh k 

You want to set it to True when condition matches

Then why to set it to False when it doesn't match.

If you don't set it as True it means it's False

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader