0

I have a requirement to hide the File Link in chatter feed. I have a VF Page and I am able to do this using the below code.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
            <script>
               $j = $.noConflict();
               $j(document).ready(function(){

                    $j('#publisherAttachContentPost').hide();  
               });
                </script>

<div id="chatter-container">
        <chatter:feedWithFollowers entityId="{!Object1__c.id}" showHeader ="true" oncomplete="refreshStatus()" reRender="statusPanel" />
    </div> 

But this works only when show Feed is clicked and the record is opened or refreshed. Below is the screenshot.

enter image description here

If the Show Feed is not clicked earlier enter image description here

and if you open or refresh the record and click on Show Feed, then the File link still appears. Below is the screenshot.

enter image description here

Can some please tell me what am I missing.

1
  • Got it fixed by making changes in the Page Layout.
    – sfdcdev
    Mar 17 '20 at 7:54
0

Made changes in Page Layout to fix it.

When you go to the Page Layout in Quick Actions you can remove the File option and save the layout.

2
  • 2
    Can you expand on this a little so that it might be of use to others later down the line?
    – Matt Lacey
    Mar 17 '20 at 11:05
  • When you go to the Page Layout - in Quick Actions you need to remove the File and save it. This worked for me.
    – sfdcdev
    Mar 17 '20 at 13:46

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.