salesforcesalesforce-chatterapex

How do I construct a Salesforce Chatter FeedItem in Apex


How do I create a Chatter Post that looks like this?

What I want to do is, have a trigger that calls a function to create a chatter post when a new contact is created. I want it to look like the image below. Right now, I have a trigger on 'Contact' that calls a function, but I'm not sure of how to create a Chatter FeedItem that looks like this.

Sample Chatter Post


Solution

  • That looks like an HTML-formatted chatter post.

    https://success.salesforce.com/ideaView?id=08730000000hGNZAA2

    Vote it up.