You need to sign in to do that
Don't have an account?
JesseA
Workarounds for allowing site user to post chatter feeditem
Have a public site whose actions I would like to, through a trigger, create a chatter post. I know people have come to this issue before, i'm looking for good workarounds.
The first one I think of is having a batch to find the record of something the site user can update and having that batch schedule itself at the end. But I've seen this get very messy. The list of scheduled jobs gets very big and at some point you have the issue of a phantom job that prevents you from deploying code even in sandboxes.
Another possible is to have an email service that accepts email sent from the site controller with the information of what post to create. I've never tried this before so not sure about any pitfalls asides from using email limit and it just being not nice.
Any other ideas/work arounds? Thanks.
The first one I think of is having a batch to find the record of something the site user can update and having that batch schedule itself at the end. But I've seen this get very messy. The list of scheduled jobs gets very big and at some point you have the issue of a phantom job that prevents you from deploying code even in sandboxes.
Another possible is to have an email service that accepts email sent from the site controller with the information of what post to create. I've never tried this before so not sure about any pitfalls asides from using email limit and it just being not nice.
Any other ideas/work arounds? Thanks.
So,In your Trigger you should be looking at something like below :-
If this helps,please mark it as best answer to help others :)
https://success.salesforce.com/ideaView?id=08730000000keDRAAY
What I was thinking is to have insert a Custom object record from Site with all the info required to insert Chatter feed and then on the insert event write a Trigger on Custom object which would insert a FeedItem record and then in the Same trigger you can delete the custom object record if you don;t want to store the same.
Hope this helps !!