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.?
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