+ Start a Discussion

Need SOQL to retrieve user records



We want to implement some emails for Chatter Free users who have not taken training/acknowledged the policy.


o After 7 days, an email is generated from Salesforce to the user reminding them to take training/sign off policy.


o After 14 days, we would like to generate another email to the user, and one to the user’s manager. We understand the application cannot send to the manager, but we would like to see what can be done outside the application, keying off the email address and referencing Active Directory.


o After 30 days, we want to deactivate the user from Chatter Free if they still have not taken training/acknowledged the policy.


Can some one send us soql for the above three categories to proceed further.


Thanks in advance..


Since you can't run workflow on the User object, you'll need to write schedulable Apex to scan the user records daily and perform the calculations and actions you need.  You can create custom fields in the User object so you'll be able to store dates.