+ Start a Discussion
SurenderSurender 

how to use ChatterMessage in Apex

Hi,

 

Can someone share code snippet to send private message in chatter using ChatterMessage object.

We need code snippet for doing this in Apex only.

 

Thanks in advance. 

bvramkumarbvramkumar

creatable() is not listed under the supported calls for ChatterMessage. So it may not be possible.

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

Jia HuJia Hu
You can post to ChatterMessage by Chatter REST API from Apex,
ref:
http://www.salesforce.com/us/developer/docs/chatterapi/Content/connect_resources_how_to.htm
bvramkumarbvramkumar

Thanks Jia Hu.