You need to sign in to do that
Don't have an account?
KRay
Exclude Multiple FeedTypes from Chatter Feed
HI Forum,
I'm looking to exclude multiple FeedItemTypes from the Chatter Feed using the Chatter:Feed or Chatter:FeedWithFollowers elements. From my research, Chatter:FeedWithFollowers doesn't have a property/method to exclude feedtItemTypes but there has to be a way to add the functionality. I've posted a snippet of apex & visualforce code below. The apex method returns a String of values but from the looks of it, I can only include or exclude a single string value using the Chatter:Feed element. Help?!?
I'm looking to exclude multiple FeedItemTypes from the Chatter Feed using the Chatter:Feed or Chatter:FeedWithFollowers elements. From my research, Chatter:FeedWithFollowers doesn't have a property/method to exclude feedtItemTypes but there has to be a way to add the functionality. I've posted a snippet of apex & visualforce code below. The apex method returns a String of values but from the looks of it, I can only include or exclude a single string value using the Chatter:Feed element. Help?!?
//Apex Snippet public String getChatterTypes(){ List<String> allTypes = new List<String>{ 'AttachArticleEvent', 'CallLogPost', 'CaseCommentPost', 'ChangeStatusPost', 'ChatTranscriptPost'}; //Excluding EmailMessageEvent String availableValues = String.join(allTypes, ','); return availableValues; }
//Visualforce Snippet <apex:page standardController="Case" extensions="redirectCaseController"> <chatter:feed entityId="{!Case.ID}" feedItemType="{!ChatterTypes}" /> <apex:detail /> </apex:page>
Here's how it works:
- During initial page load, the chatter feed will be hidden from the view by the css snippet.
- If the apex logic validates to TRUE, jquery will hide the email (EmailMessageEvent) chatter posts then show the customized chatter feed.
Apex Method://For this demo, I'm simply returning true. Add whatever logic you deem necessary
Visualforce Page:
VisualforceComponent: CSS:
JQuery: