Skip to content

Commit 7bf7688

Browse files
authored
Apply Field Style on Reviewers if anyone is inactive
1 parent a9655ad commit 7bf7688

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//The below code followed by "javascript:", inside 'Value' field for the List type Reviewers field's Style record will do the condition check.
2+
3+
var answer = false;
4+
var arr=[];
5+
arr = current.reviewers.split(',');
6+
for(i=0; i<arr.length; i++){
7+
var gr = new GlideRecord('sys_user');
8+
gr.addQuery('sys_id',arr[i]);
9+
gr.query();
10+
if(gr.next()){
11+
if(gr.active == false){
12+
answer = true;
13+
}
14+
}
15+
}
16+
answer;
17+
18+
//The Style field then must be populated with the style we want to apply. I have applied "background-color: blue;" "text-decoration:line-through;"

0 commit comments

Comments
 (0)