+ Start a Discussion
Zoom_VZoom_V 

Record feed in VF page

I am just trying to show the Show Feed for the specific record viewing at the top of the VF page. I thought I could use a universal reference like the one I am using to show a user's feed such as this : 

 

<chatter:feedWithFollowers entityId="{!$user.Id}"/>

 

 

I thought this would work : 

<chatter:feedWithFollowers entityId="{!record.Id}"/>

 

But that's not working. Do I need to identify the record somehow first ? 

Thank you.

 

 

Best Answer chosen by Admin (Salesforce Developers) 
APathakAPathak
Hi,
Is Chatter -> Feed Tracking -> "Enable Feed Tracking" checked for the object which you are showing feed (record.id in this case) ?

All Answers

Bhawani SharmaBhawani Sharma
<chatter:feed entityId="{!record.Id}" />

This works for me
Zoom_VZoom_V

I tried using that on the VF page, but I was given an error saying the chatter:feed component could not be nested within form tags. Do you have a solution to that ? 

 

Thank you

Bhawani SharmaBhawani Sharma
Yes, you will have to put it outside the form tag.
Zoom_VZoom_V

I've been putting it outside the <form> tag but it doesn't show up. 

 

Here is the VF page : 

<apex:page standardController="Contract_Overview__c" extensions="ContractOverviewControllerExtension"> 
  
  <apex:form >
   <apex:pageBlock title="Contract Terms"> 
     <apex:pageBlockTable value="{!ContractOverview.New_Contract_Terms__r}" var="con"> 
      <apex:column width="35%" headerValue="Contract Terms">
        <apex:facet name="header"> Contract Name</apex:facet>              
        <apex:outputtext value="{!con.Name}"/>         
      </apex:column>
      <apex:column width="15%">
        <apex:facet name="header"> Record Type</apex:facet>
        <apex:outputtext value="{!con.RecordType.Name}"/>
      </apex:column>         
      
        <apex:column width="15%">
        <apex:facet name="header"> Contract Effective Date</apex:facet>
        <apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
          <apex:param value="{!con.Contract_Effective_Date__c}"/>
        </apex:outputText>        
      </apex:column>  
      
       
      <apex:column width="15%">
        <apex:facet name="header"> End Date</apex:facet>
        <apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
          <apex:param value="{!con.Contract_End_Date__c}"/>
        </apex:outputText>        
      </apex:column>     
      
      <apex:column width="30%">
        <apex:facet name="header"> Owner</apex:facet>
        <apex:outputtext value="{!con.Owner.Name}"/>
      </apex:column>
    </apex:pageblocktable>         
  </apex:pageBlock>
 </apex:form> 

 <apex:detail relatedList="True" inlineEdit="true"/>
 <apex:relatedList subject="{!ContractOverview}" list="New_Contract_Terms__r"/>
  <chatter:feed entityId="{!record.Id}" />
</apex:page>

 In this case I have put it at the very bottom. I've also tried putting it at the beginning between the <page> header and the <form> tag but nothing has worked.

 

Any ideas ? 

 

Thank you.

APathakAPathak
Hi,
Is Chatter -> Feed Tracking -> "Enable Feed Tracking" checked for the object which you are showing feed (record.id in this case) ?

This was selected as the best answer
Zoom_VZoom_V

That was it.

 

Thanks APathak !