I need to bulk delete open tasks that are assigned to Inactive users. I need to exempt a particular profile(sales profile) from this. Can you guys suggest me the best way to delete the open tasks for inactive users.?
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
Use dev console or data loader to query and delete the records.
For Dev Console:
Task t = [Select ID From Task Where Owner.isActive = false and isClosed = false and owner.ProfileID != 'EXCLUDED PROFILED']; delete t;
If more than 10K then put a limit 1000 in the very and run multiple times until no records are returned. Also you