Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

How can I delete all case comments that are in application in a quick way? Is there even a quick way?

share|improve this question
add comment

1 Answer 1

up vote 6 down vote accepted

If there are a lot of records (>10.000) it's best to use DataLoader to first retrieve all CaseComment record Id's, then delete based on that output file.

If the amount is under 10.000, you can do the following from the 'Execute Anonymous' window in the Developer Console:

delete [Select Id From CaseComment];

Optionally you could split that up into chunks of 10.000. You'd have to run it a couple of times then:

delete [Select Id From CaseComment LIMIT 10000];
share|improve this answer
2  
A frighteningly powerful piece of knowledge. –  Simon Lawrence Apr 11 at 15:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.