06/14/2023 11:57 PM
Hi Team,
We have a requirement, there on the user's end date, we want to disable the user at the end of the day at 6 pm.
Could you please help us how can achieve this?
Thanks
Sandeep
06/16/2023 01:52 PM
You can use Datediff function in the User Update Rule Advanced Config to check the difference between users end date and system date. If the value is equal to 1 then Disable User action will be triggered.
datediff(now(),a.enddate) = 1
Thanks
06/16/2023 03:19 PM
The above condition will disable the user next day. If you want the user to be disabled exactly at 6 PM then you would have to modify the condition and consider below scenarios:
1. The user update rule needs to be marked as detective and the DetectiveProvisioningRules job should be scheduled to run frequently.
2. In your advanced query condition, you need to add 18 hours to the user's enddate and the difference of that with currentddate should be greater or equal to 0.
3. Consider the timezone of the user's location.
Please use these suggestions to form your condition for the user update rule.
Thanks