Scheduled job email reminder 30/60/90

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2022 01:00 AM
Hi Experts,
I need to send a email reminder and create comments on a record if the user hasnt updated it after 30 days and 60 days.
How can create a comment on the record with out updating the record - I've tried gr.autoSysFields(false); but this fires the notification and does not update the record (see code below)
var gr = new GlideRecord('sn_hr_core_case');
gr.addEncodedQuery('sys_updated_onRELATIVELT@dayofweek@ago@30');
gr.addQuery('assignment_group' ,'IN',gs.getProperty('sn_hr_core.hr.assignmemt.group'));
gr.query();
while (gr.next()) {
gr.comments = 'You have not provided an update on your case within the last 30 days. It is really important that you provide an update within the next 60 days or the case will be closed.
gr.autoSysFields(false);
gr.update();
Can anyone advise?
Thanks
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2022 02:58 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2022 09:35 AM
Hi Akash.
Why did you reply an exact copy of Ankurs reply?