function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vasu takasivasu takasi 

how to insert a feedItem from trigger

trigger acc on FeedItem (after insert)
FeedItem post = new FeedItem();
post.ParentId ='0019000000GuVUM';
post.Body = 'welcome';



the above code showing exception like



How to solve it.


can you please state in narrative form what you want your trigger to accomplish?  then we might be able to help.  thanks

vasu takasivasu takasi

just i need to post a feed on parent account of a perticuler opportunity, whenever we post a feed on that opportunity.