- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2019 01:56 AM
Hi Team ,
when user is not using service now Account after 90 Days , the account will be deactivate from service now and also trigger the notification .
so,i was stuck in Scheduled jobs user is deactivate form user table but notification is not trigger .please look in below script .
1.Written Notification
2.Event Registry
var user = new GlideRecord('sys_user');
user.addEncodedQuery("active=true^last_login<=javascript:gs.beginningOfLast90Days()");
//user.addEncodedQuery("active!=false^name=user, test");
user.query();
while(user.next())
{
gs.eventQueue("logout_user_90days",user,user.email);
user.active = 'false';
user.locked_out = 'true';
user.update();
}
Solved! Go to Solution.
- Labels:
-
Best Practices
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2019 02:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2019 02:03 AM
in your email notification , at Who will receive section verify if Event parm 1 contains recipient is checked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2019 02:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2019 02:49 AM
Hi Babu, it seems that @vhudlikar answers below is correct. inactive/lockout users will not be able to received email notification.
you may refer to this link https://community.servicenow.com/community?id=community_question&sys_id=30bb0ba1db9cdbc01dcaf3231f96...
https://hi.service-now.com/kb_view.do?sysparm_article=KB0528661
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2019 02:22 AM