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
bhs00bhs00 

viewing private messages in chatter

Is there a way to view all of the chatter private messages by using the Apex Data Loader?

Best Answer chosen by bhs00
SamuelDeRyckeSamuelDeRycke

 

Yes. I'm suprised no one has replied yet.

 

Permission required: System Permissions > Manage Chatter Messages

You'll have to clone one of the existing profiles to enable it, and then assign a user to the profile. If you're cloning the Admin profile, keep in mind you'll need an other admin to change your profile to the new profile with manage chatter messages enabled.

 

 

In dataloader:  

  • Log in with a using having the above permission/profile. 
  • you can export, chek "Show all Salesforce objects" and select the Chatter Message object.
  • In step 3: Edit your query you can enter a query, for instance : "SELECT id, body, ConversationId, SenderId, SentDate from chattermessage"

 

This will give you an export of all chatter messages. Im at this time not sure how you can see to whom the message is send, I suppose that's in the conversation object. 
You could also add a '"where Senderid != 'Chatter Expert user Id' " to your query to filter out all the  default welcome to chatter messages and such.

 

 

All Answers

SamuelDeRyckeSamuelDeRycke

 

Yes. I'm suprised no one has replied yet.

 

Permission required: System Permissions > Manage Chatter Messages

You'll have to clone one of the existing profiles to enable it, and then assign a user to the profile. If you're cloning the Admin profile, keep in mind you'll need an other admin to change your profile to the new profile with manage chatter messages enabled.

 

 

In dataloader:  

  • Log in with a using having the above permission/profile. 
  • you can export, chek "Show all Salesforce objects" and select the Chatter Message object.
  • In step 3: Edit your query you can enter a query, for instance : "SELECT id, body, ConversationId, SenderId, SentDate from chattermessage"

 

This will give you an export of all chatter messages. Im at this time not sure how you can see to whom the message is send, I suppose that's in the conversation object. 
You could also add a '"where Senderid != 'Chatter Expert user Id' " to your query to filter out all the  default welcome to chatter messages and such.

 

 

This was selected as the best answer
Keyur PatelKeyur Patel

Hello,

 

I want to display Chatter Private messages in my custom Apex page. I will call my custom apex page from my .Net application. I am gettting Insufficient Privileges error when i run my custom apex in salesforce. Please suggest me how can i display my Chatter private messages?

 

Here is my code.

 

<!-- Page:  -->

<apex:page Controller="ChatterMessage" Extensions="PrivateMessages">  

<!-- Begin Default Content REMOVE THIS -->  

<h1>Congratulations</h1>   This is your new Page: PrivateMessages  

<!-- End Default Content REMOVE THIS -->    

<apex:form >    

 <apex:pageBlock title="My Content" mode="edit">        

<apex:pageblocktable value="{!chatter}" var="objChatter">        

<apex:column value="{!objChatter.Body}"/>        

<apex:column value="{!objChatter.ConversationId}"/>       

  <apex:column value="{!objChatter.SenderId}"/>  

</apex:pageblocktable>  

<apex:pageBlockSection title="My Content Section" columns="2">                   

<apex:inputField value="{!ChatterMessage.SentDate}"/>        

<apex:inputField value="{!ChatterMessage.Body}"/>

 </apex:pageBlockSection>

</apex:pageBlock>    

</apex:form>

</apex:page>

 

 

/*** Controller  ***/

public class PrivateMessages {

    public PrivateMessages(ApexPages.StandardController controller)     {

    }

    public ChatterMessage chatter;    

    public PrivateMessages()     {         }    

    public List<ChatterMessage> getchatter()     {            

    List<ChatterMessage> chatterlist=[SELECT Body,ConversationId,Id,SenderId,SentDate FROM ChatterMessage where       SenderId!= '000000000000'];        

system.debug('*****chatterlist'+chatterlist);        

return chatterlist;    

}

}