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
Sharmila SahooSharmila Sahoo 

I need to disable chatter feed to appear on home page and any record page. I have created VF page and used it in VF home page component but it is not working

Please find below VF page Code.

<apex:page sidebar="false" showHeader="false" standardStyleSheets="false">
 <head>
 <script type="text/javascript">
    function hideChatterFeed(){
        var isFeedShown =
            document
                    .getElementById('hideFeedLink')
                    .style
                    .display == 'none' ? false:true;

        if(isFeedShown && chatter){
            if(sfdcPage.entityId){
                chatter.getFeed().toggle(
                    '{"subjectId":"' + sfdcPage.entityId + '","feedType":"ENTITY"}'
                );
            }
            else{
                chatter.getFeed().toggle(
                    '{"subjectId":"","feedType":"NEWS"}'
                );           
            }
        }
    }

    document.onreadystatechange = hideChatterFeed;
</script>
 
 </head>
 
</apex:page>

User-added image

But It is not working. Please help.
 
Waqar Hussain SFWaqar Hussain SF
You can remove Chatter feeds from any object, from Salesforce setting.

Go to setup => Customize => Chatter => Feed Tracking

Select any object from which you want to disable chatter feeds and then uncheck the checkbox Enable Feed Tracking