Skip to content

Commit af09eba

Browse files
authored
Create Create Incident Task With Same Group
1 parent 04c6cbd commit af09eba

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
var incRec = new GlideRecord('incident');
2+
incRec.addEncodedQuery('assignment_group=287ee6fea9fe198100ada7950d0b1b73^active=true'); // encoded Query to get incients assigned to particular group
3+
incRec.query();
4+
var eQry = incRec.getEncodedQuery();
5+
6+
while(incRec.next()){
7+
var iTask = new GlideRecord('incident_task');
8+
iTask.initialize();
9+
iTask.applyEncodedQuery(eQry);
10+
iTask.setValue('incident', incRec.getUniqueValue());
11+
iTask.insert();
12+
}
13+

0 commit comments

Comments
 (0)