- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2023 08:42 AM
Below is the code which triggers event but event's state turns to ERROR, please find screenshot also
var gr = new GlideAggregate("sysapproval_approver");
gr.addQuery("state", "requested");
gr.addAggregate("COUNT", "approver");
gr.query();
while(gr.next()){
gs.eventQueue("send_approval_reminder",gr, gr.approver, gr.approver.getDisplayValue());
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2023 10:08 AM
Hey guys, thanks all for your help and putting time into it, I was able to figure out this
I stored approver sys ids into an array and then looped it for triggering email.
That Worked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2023 07:15 AM
I am facing similar issue, Could you please post your solution here.
Thanks,
Uma.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2023 06:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2023 06:46 PM
please find below
arr=[];
var ga = new GlideAggregate("sysapproval_approver");
ga.addQuery("state","requested");
ga.groupBy('approver');
ga.query();
while(ga.next()) {
arr.push(ga.approver.sys_id.toString());
}
for(var i = 0; i<=arr.length; i++)
{
var x= arr[i];
var gr = new GlideRecord('sys_user');
gr.get(x);
gs.eventQueue("send_approval_reminder",gr, gr.sys_id, gr.name);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2023 07:50 AM