+ Start a Discussion
cvuyyurucvuyyuru 

Chatter Message from apex...

How can I insert a chatter message to an User from Apex ?

 

I am trying with chattermessage Object.

 

But this is not writeable.

 

 

Else,

 

 

Can I send a link as private feed to my Users? Is it possible?

 

 

How can I send a message to User in Chatter?

 

 

 

 

Chamil MadusankaChamil Madusanka

Hi,

 

Get the help from following link,

 

http://wiki.developerforce.com/index.php/Chatter_Code_Recipes

 

If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

 

Chamil's Blog

Chamil MadusankaChamil Madusanka

Here is another link,

 

http://media.developerforce.com/cheatsheets/SF_chatter_4Pg_HR.pdf

 

If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

Jia HuJia Hu
You can post to ChatterMessage by Chatter REST API from Apex,
ref: Send a private message
http://www.salesforce.com/us/developer/docs/chatterapi/Content/connect_resources_how_to.htm#cc_send_message
GerhardNewmanGerhardNewman

Has anyone managed to figure out how to do this from apex? Example?

Bruno Affonso 6Bruno Affonso 6

** Task is not enabled for feeds.

FeedItem post = new FeedItem();
post.ParentId = oid; //eg. Opportunity id, custom object id..
post.Body = 'Enter post text here';
insert post;