I have an issue when I try create a post from an apex class, the user is a customer community user and I create the post from a Lightning community

ConnectApi.ChatterFeeds.postFeedElement(Network.getNetworkId() , '0F96E000000D1InSAK' ,  ConnectApi.FeedElementType.FeedItem , postChatter);

The above line of code throw an excpetion 'System.NoAccessException - Class.ConnectApi.ChatterFeeds.postFeedElement'. The user is correctly added to the community group, any idea?


The problem was the settings 'Only Broadcast' in the group, if it's checked the customer user cannot post in the group

| improve this answer | |
  • Is it all your passing in your payload? To post feeds, there are two to three required fields like type, parent id etc .. did you already enabled feed for whichever object you are posting to? – Raj Mar 12 at 11:05
  • I'm posting on a private group, but I have already fix unchecking the setting Only Broadcast in the group, thanks anyway – MatteoL Mar 13 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.