How to check the validity of a user.

Renu4
Tera Contributor

Dear All,

We in our company have many external consultants working in our servicenow and we would like to set up validity date for these users.

Say for eg if we have the valididty of a user for 1 year just before the account expires the manager has to get a notification either to approve the user to continue or decline so the admin can deactivate or extend the users validity.

For this purpose i have added an extra date field in user table.

But how do i trigger these report.

Can someone guide me ?

Thank you in advance,

Renu.

 

 

2 ACCEPTED SOLUTIONS

For using scheduled job, you got to do the same logic but using scripting and creating event and triggering notification. 

 

Do it with flow its very easy and no code solution. if you find my answer helpfull please mark it correct or helpfull. it just takes a click...


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

View solution in original post

Hi @Renu4 

 

Flow designer is very powerful and help you to grow yourself in SN world. Try to do these trainings

 

LearnNGrowAtul_0-1703068907833.png

 

 

Now regrading your question

 

Expert @Sohail Khilji  already suggested the way to do and I 100% agree with him on the way and screen shot.

 

 

Also where do i check the logs if a notification was triggered?

Atul: You can check in the logs --> emails

and do we need to create a notification prior to creating the FLow.

Atul: No, it will be part of Flow only.

If i have to use schedule job then how would i do that?

Atul: It can be do able in Flow and you need to just set the trigger for same.

 

Once your issue get resolved, please accept both's (mine and @Sohail Khilji ) answer as solution, as we are helping you to grow.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

8 REPLIES 8

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Renu4 

 

You can do it via Flow Designer , where notification will go out

 

Action: Look Up records  ( in user table)

Loop for each record

If the Validity date is less then 2 month ( Lets say)

Then 

Action - Notification 

to: user.manager

 

or if you want to create a report and schedule it

 

Create report on sys_user table

in condition 

 

LearnNGrowAtul_0-1703063484344.png

 

 

Last login replaced by Validity date  

So the logic will be

Validity date is less than 1 month

or use

 

LearnNGrowAtul_1-1703063595465.png

 

 

Try these 2 and share the feedback

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hello Atul,

Flow designer is relatively new to me.i tried executing what you mentioned in your post but i want to know who would get a notification as we are not specifying anyone(manager/admin).

Also where do i check the logs if a notification was triggered?

and do we need to create a notification prior to creating the FLow.

If i have to use schedule job then how would i do that?

Hi @Renu4 

 

Flow designer is very powerful and help you to grow yourself in SN world. Try to do these trainings

 

LearnNGrowAtul_0-1703068907833.png

 

 

Now regrading your question

 

Expert @Sohail Khilji  already suggested the way to do and I 100% agree with him on the way and screen shot.

 

 

Also where do i check the logs if a notification was triggered?

Atul: You can check in the logs --> emails

and do we need to create a notification prior to creating the FLow.

Atul: No, it will be part of Flow only.

If i have to use schedule job then how would i do that?

Atul: It can be do able in Flow and you need to just set the trigger for same.

 

Once your issue get resolved, please accept both's (mine and @Sohail Khilji ) answer as solution, as we are helping you to grow.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Sohail Khilji
Kilo Patron
Kilo Patron

@Renu4 ,

You can create a schedule job / flow (recommended as it can drive further process ) that runs every day once to check if there are any users getting expired in next 1 week or 2 weeks. Accordingly you can trigger a notification to users manager.

 

check the sample flow:  (in place of create field use your custom field and choose a notifcation to send to manager):

 

SohailKhilji_0-1703064257522.png

 

 

 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect