- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2014 02:49 AM
var gr = new GlideRecord('u_email_object');
gr.addActiveQuery();
gr.addEncodedQuery('u_expiration_dateBETWEENjavascript:gs.daysAgoStart(0)@javascript:gs.endOfNextWeek()');
//query above would find records active whose expiration date field value is today
gr.query();
while (gr.next()){
gs.log(gr.u_number);
gs.eventQueue('expiration.date',current,current.u_owner,current.u_alias);
//gs.log("testing");
}
is there any syntax wrong while calling the event expiration.date??
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2014 02:59 AM
Hi Rakesh,
Current won't work in Scheduled Jobs.
That is the reason your Event is not getting triggered.
Try using this:-
gs.eventQueue('expiration.date',gr,gr.u_owner,gr.u_alias);
Thanks,
Subhajit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2014 02:53 AM
Were you able to find these logs??
gs.log(gr.u_number);
&&
gs.log("testing");
???
If yes then did you check the event logs to see if the event was fired or not?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2014 02:54 AM
HI anurag
gs.log(gr.u_number);
&&
gs.log("testing"); are appearing. but event is not getting triggered .:(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2014 02:56 AM
how ever in event logs i can see it is getting triggered , but in notifications i have added an user to get an email , this email notidfication is not triggered
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2014 03:04 AM
im sorry, i just realized that this is a scheduled job we are discussing. This script will not in jobs as you will not have current.
However if you have to use emails of some reports or extract then you can created a different script to achieve . other wiise in this scenario you must use GR instead of current