You need to sign in to do that
Don't have an account?
Rajiv
Trigger for Chatter
Hi,
I wrote trigger for Chatter . This trigger basically send an email to a person whatever we right on their wall, but the main problem is that whenever I write on my own wall this trigger doesn't execute/ work , It should work and send email to me also. Right now I am comparing userId of userobject with ParentId of UserFeed.
Can anyone help on this issue. How can I solve this problem.
Thanks,
Rajiv
There are two types of Chatter triggers: FeedItem and FeedComment. Are you firing a trigger on both or just one?
BTW - From a design perspective, I'm curious why you're writing a trigger to send an email. When you post on someone's profile, it already sends them an email. In other places, you can now use @mentions and that will send an email. Is there a functionality gap you're trying to overcome here?
Hi,
I have wriitten trigger for both Feeditem and Feedcomment object. Feedcomment trigger works fine but Feeditem trigger won't execute when I post on my own wall.
SOQL query for userfeed which I use:
List<UserFeed> userFed = [SELECT Id, Type, body ,ContentFileName, InsertedById,ParentId, FeedPost.Body, FeedPost.Title, FeedPost.ContentData, FeedPost.FeedItemId from UserFeed where parentId =: Ids ];
Where Ids is the parentId of FeedItem.
Right now Iam using UserFeed. Should I have to use different Feed. I also checked with newsfeed and userprofilefeed but it was not worked. Can you Please Suggest me which Feed I have to use so that sending mail from my wall is possible.
Thanks,
Rajiv
Some more color is available here:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_ignoring_operations.htm?SearchType=Stem&Highlight=FeedItem|FeedItems
I don't see any way around that, when posting your own status updates, but someone else may have an idea.
I'm still curious: Chatter already sends an email when someone posts to your profile. Are you looking to send email to someone other than the user whose profile is being posted to?
FeedItem insert triggers don't run for changes to the user status. You'll have to add a user object update trigger and detect a change to the CurrentStatus field.