• Greg Brown 4
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
Hi,

I have created a VF page for a custom object that will display pictures at the top of the page.  I'm able to get regular attachments to display when uploaded from the Notes & Attachments related list on the object, but a picture that is uploaded through the Chatter Feed is not displayed.  I noticed that the Attachment Type is different for Chatter Feed Attachments "Feed Attachment".  Can someone advise how I can include the Feed Attachment types in my VF Page.  I'm missing something, my code is below...
Thanks in advance!
Greg
 
VF Page
<apex:page standardController="Acquisition_Report__c" extensions="AcqusitionReportControllerExtension">

<!-- <chatter:feed showPublisher="true" entityId="{!Acquisition_Report__c.id}"/>  -->

    <apex:pageBlock >
        <apex:pageBlockSection title="Photos ({!totalPhotos})" collapsible="false">
            <apex:repeat value="{!photos}" var="photo">
                <apex:image url="{!URLFOR($Action.Attachment.Download, photo)}" height="100" width="150" />                   
            </apex:repeat>
              
        </apex:pageBlockSection>
     
      
        <apex:detail inlineEdit="true"/>
    </apex:pageBlock>


</apex:page>
 
Extension Code

public with sharing class AcqusitionReportControllerExtension {
 
    private ApexPages.standardController controller;
     
    private Acquisition_Report__c acquisition;
 
    private List<Id> photoIds;
 
    public AcqusitionReportControllerExtension(ApexPages.StandardController controller) {
        this.controller = controller;
         
        this.acquisition = (Acquisition_Report__c)controller.getRecord();
    }
 
    public List<Id> photos {
        get {
            if(photoIds == null) {
                photoIds = new List<Id>();
                for(Attachment att : [select Id from Attachment where ParentId  = :acquisition.Id]) {
                    photoIds.Add(att.Id);
                }
            }
                             
            return photoIds;
        }
    }
     
    public Integer totalPhotos {
        get {
            return photos.size();
        }
    }
}

 
Hi - I have the the following visualforce page. I have been trying to display fields based on the record type selected. I'm using fieldsets. This is based on one fieldset. I have 10 record types and each has separate page layout. How do I make it dynamic so that based on the record type, it display fields?
 
<apex:page standardController="Auto__c" renderAs="pdf">

 <apex:form >
  <apex:pageBlock title="Details">
      <apex:pageblockSection columns="1">
          
          <apex:repeat value="{!$ObjectType.Auto__c.FieldSets.Cars}" var="f">
                <apex:outputfield value="{!Auto__c[f]}">
                </apex:outputfield>
          </apex:repeat>
  
      </apex:pageblockSection>
  </apex:pageBlock>

 </apex:form>
</apex:page>

 
  • December 30, 2015
  • Like
  • 0
I am designing a customer Portal , having credentials as contact information. I want to access opportunity object over the customer Portal . but I am unable to get access to Opportunity Object.I am using my own Vf pages and custom controller.I am facing the Problem , Iam unable to give assessibility to cutomer Portal user Profile for opportunity object.
Hi, I have just completed Instructior led 401 training but I am not sure If I will get the certification voucher or not. Is that something you can clarify if I should wait for the voucher or not? If yes then when?