Skip to content

Commit a4efa03

Browse files
authored
Apply Field Style on Reviewers if anyone is inactive
1 parent ce6a5a8 commit a4efa03

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
//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(',');
2+
var answer = false;
3+
var arr=[];
4+
arr = current.reviewers.split(',');
65
for(i=0; i<arr.length; i++){
76
var gr = new GlideRecord('sys_user');
87
gr.addQuery('sys_id',arr[i]);
9-
gr.query();
10-
if(gr.next()){
11-
if(gr.active == false){
8+
gr.query();
9+
if(gr.next()){
10+
if(gr.active == false){
1211
answer = true;
1312
}
1413
}
15-
}
14+
}
1615
answer;
1716

1817
//The Style field then must be populated with the style we want to apply. I have applied "background-color: blue;" "text-decoration:line-through;"
18+
background-color: blue;
19+
text-decoration:line-through;

0 commit comments

Comments
 (0)