function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NarenKNarenK 

Deleting Chatter Messages.

Hi All,

 

How can we delete chatter messages present in a SF org?

 

Regards,

Naren

NerdFishNerdFish

Administrators with the appropriate permissions can view and delete all users' Chatter messages.

An administrator with the “Manage Chatter Messages” permission can view and delete all users' messages in Chatter; for example, for compliance purposes. Users with this permission can access all users' Chatter messages via the SOAP API.

When deleting Chattermessages, consider these guidelines:
  • Messages are hard deleted. They aren’t sent to the Recycle Bin.
  • Deleted messages aren’t included in message search results.
  • If all messages in a conversation are deleted, the conversation isn’t shown in My Messages and can’t be retrieved via the Chatter REST API.
  • If replies via email are enabled, when a user replies to a deleted message, Chatter returns an error notification and doesn’t process the reply message.
Anonymous DeveloperAnonymous Developer
Yes, this is possible using the Data Loader as Chatter Messages can only be accessed via SOAP API.
 
An administrator or user with the “Manage Chatter Messages” permission can view and delete from Chatter. Users with this permission can access all users' Chatter messages via the SOAP API.
 
To get the “Manage Chatter Messages” permission, we've to create a permission set and assign it to the profile.
 
Once this permission is added to the profile, the user can see the "Chatter Messages" object in Data Loader.
 
NOTE: Reports will not work to get the "Chatter Message" ID. You've to use the Data Loader tool to get this ID. First Export the Chatter Messages:
Open the Data Loader application and click on Export.
Sign in using Salesforce Credentials + Security Token and check the box "Show All Salesforce Objects".
Select "Chatter Messages" from the object list.
Click Browse and specify the location to save the file and click on Next.
Click the "Select All Fields" button (NOTE: To see the content of the message, select the Body field).
Click on Finish and Ok.
Now you've to delete the required chatter message using the ID of the chatter message which you want to delete. Follow the below steps:
Open the extracted CSV highlight only the ID column.
Copy that column and paste it into a new Excel file.
Save this file as Comma Separated Value type (CSV).
Open Data Loader application.
Sign in using Salesforce Credentials + Security Token.
Choose ‘Chatter Message’ from the list and open the newly created CSV using the ‘Browse’ button.
Click Next.
Click the ‘Create or Edit a Map’ button.
Click the ‘Auto-Match Fields to Columns’ button to match the CSV fields with fields in Salesforce.
Click OK & click Next.
Choose the location where you want to save Result & Error CSV files using the Browse button.
Click Finish.

Hope this helps.