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
viswadaviswada 

Send private chatter message from A[ex

HI all,

 

 

                    I wnat to send private chatter meassge from apex code , pla any one provide sample  apex code  to send private chatter Messages.

SFDC_EvolveSFDC_Evolve

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_chattermessage.htm

 

This will help you . to send the message .. Create the instance of the Object and Fill the Neccessary field and then Insert the Record . .  

 

Please mark it solve if  it solves the issues . 

 

Thanks

Ankit

viswadaviswada

Hi ,

 

             I follwed  the Like 

  

ChatterMessage cm =new ChatterMessage();
cm.body='HI This RoYal Gents Show room';
cm.ConversationId='00590000001EM7D';
cm.SenderId='00590000000bO0Y';
cm.SentDate=system.now();
insert cm;

 

 

   I  am getting errors like chatterMessage .body is not writable, chattermessage.consversationis is not writable.......

 and like this error for every field, and can't perform DML Operations  on ChatterMessages