Evaluator: com.glide.script.RhinoEcmaError: "event" is not defined.

Dinesh
Tera Guru

for below script we are getting error like below.

Evaluator: com.glide.script.RhinoEcmaError: "event" is not defined.

 

Dinesh_0-1672217319438.png

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

2 ACCEPTED SOLUTIONS

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**

View solution in original post

Finally working  as per below change done.

Dinesh_0-1672229447962.png

 

View solution in original post

9 REPLIES 9

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**

@Hemant Goldar ,

Script Action:

Dinesh_0-1672227435535.png

Event Name:

Dinesh_1-1672227530548.png

Scheduled job:

Dinesh_2-1672227571464.png

 

 

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**

Finally working  as per below change done.

Dinesh_0-1672229447962.png

 

Hi @Dinesh ,

 

please mark my answer as correct and close this thread .

 

Regards,

Hemant