You need to sign in to do that
Don't have an account?
SF7
De-activate users after certain time
Hi
Is there a way that all the users who are not logged in for 90 days be auto matically de-activated and we should exempt couple of users from it.
FYI
i already tried using workflows but unfortunately we cannot do much on the User object with workflows.
Thanks.
here is my final code
global class ScheduleDeactivateUsers implements Schedulable {
/* Input: NA
Process: The execute method instantiate's the DeactivateUsers.cls and is schedulable
through UI or apex code.
*/
global void execute(SchedulableContext ctx){
DeactivateUsers uu = new DeactivateUsers();
Database.executeBatch(uu);
}
}
All Answers
You can use 'Apex Scheduler' to schedule an apex class that would periodically check for users to be deactivated based on your criteria. You'd have to write some apex code for that.
Create a Schedulable class and Run it with the below logic.
Hope this helps.
joshisrik@gmail.com
Senior Technical Analyst|Schneider Electric.
Probably just a typo, but that would give quite the unexpected outcome.
This might be more appropriate :)
Hi Srikanth
Thanks for the reply and the code i am gona try that
Thanks Shamil for the reply and i got the idea i totally forgot about that option , ofcourse i never used it until now i am gona try that
Thanks Sdry
here is my final code
global class ScheduleDeactivateUsers implements Schedulable {
/* Input: NA
Process: The execute method instantiate's the DeactivateUsers.cls and is schedulable
through UI or apex code.
*/
global void execute(SchedulableContext ctx){
DeactivateUsers uu = new DeactivateUsers();
Database.executeBatch(uu);
}
}
POA:
My work today
-->Create a Application to Add the custom record details and
display details same page using lightning component.
-->create BatchApex class that check project has still active
and close date is equal the night,set the project to in-active.
Thanks.
POA:
My work today
-->Create a Application to Add the custom record details and
display details same page using lightning component.
-->create BatchApex class that check project has still active
and close date is equal the night,set the project to in-active.
Thanks.