- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2022 12:50 AM - edited 12-28-2022 12:50 AM
for below script we are getting error like below.
Evaluator: com.glide.script.RhinoEcmaError: "event" is not defined.
var gr = new GlideRecord("sys_user");
gr.addQuery("sys_id", event.parm1);//this line not working
//gr.addQuery("sys_id", "3883f4c0730123002728660c4cf6a754");//working but only one record is updating..
gr.query();
if (gr.next()) {
gs.info("User is deactivated" + gr.user_name);
gr.active = false;
gr.update();
}
can any one help me for this
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2022 03:46 AM - edited 12-28-2022 03:47 AM
For Script action --Deactive User set action name=deactivate_user..
It will deactivate your user which were not logged in from 85 days.
once changes are done please go to Schedule Job and use UI action Execute now to check the user are getting deactivated .
Hope this helps.
Regards,
Hemant
**Please mark my answer correct or helpful based on the impact**
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2022 04:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2022 03:01 AM
Hi @Dinesh ,
Can you check for Script Actions
Name: Deactive User
Event name : deactivate_user ???
Regards,
Hemant
**Please mark my answer correct or helpful based on the impact**
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2022 03:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2022 03:46 AM - edited 12-28-2022 03:47 AM
For Script action --Deactive User set action name=deactivate_user..
It will deactivate your user which were not logged in from 85 days.
once changes are done please go to Schedule Job and use UI action Execute now to check the user are getting deactivated .
Hope this helps.
Regards,
Hemant
**Please mark my answer correct or helpful based on the impact**
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2022 04:11 AM
Finally working as per below change done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2022 04:15 AM - edited 12-28-2022 04:16 AM