• Kevin Radmall
  • NEWBIE
  • 10 Points
  • Member since 2015
  • Salesforce.com Administrator
  • Proofpoint

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

I am having an issue getting child recording showing up on a visual force page

Here is my current controller and visual forcepage code


public class MRAController { List<Account> Acts = [Select a.Name, (Select Id , Name, CreatedDate From Opportunities ORDER BY CreatedDate DESC LIMIT 1), (Select Title, CreatedDate From NotesAndAttachments ORDER BY CreatedDate DESC LIMIT 1), (Select Description, CreatedDate From ActivityHistories ORDER BY CreatedDate DESC LIMIT 1) From Account a WHERE OWNERID ='00570000003FI8tAAG' LIMIT 1]; List<Account> Acts2 = [Select a.Name, (Select Id, Name, CreatedDate From Opportunities ORDER BY CreatedDate DESC LIMIT 1), (Select Title, CreatedDate From NotesAndAttachments ORDER BY CreatedDate DESC LIMIT 1), (Select Description, CreatedDate From ActivityHistories ORDER BY CreatedDate DESC LIMIT 1) From Account a WHERE OWNERID ='00570000002ZCzzAAG']; public List<Account> getActs(){ return Acts; } public List<Account> getActs2(){ return Acts2; } }

<apex:page sidebar="false" controller="MRAController" >
<apex:form >   
 
    <apex:tabPanel activeTabClass="Blue" switchtype="ajax" >
    <apex:tab label="Jim Bridger" LabelWidth="100" id="tb1"><apex:pageBlock >
    <apex:pageBlockTable value="{!Acts}" var="a" ID="table">
    <apex:Column value="{!a.ID}" Width="120"/>
    <apex:Column value="{!a.Name}"/>
    </apex:pageBlockTable>
    </apex:pageBlock>
    </apex:tab>
 <apex:tab label="Jim Bridger 2" LabelWidth="100" id="tb2">
    <apex:pageBlock >
    <apex:PageBlockTable value="{!Acts2}" var="b">
    <apex:column value="{!b.ID}"/>
    <apex:column value="{!b.Name}"/>
    </apex:PageBlockTable>
    </apex:pageBlock>
    </apex:tab> 


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

I am having an issue displaying the opportunites

Right now I can only get the Account Information to display and can not get the Opportunity Information to display

Account Name - Opportunity ID - Opportunity Name - Note Title - Created Date - Activity Title - Created Date

 
Hi Everyone,

I am having an issue getting child recording showing up on a visual force page

Here is my current controller and visual forcepage code


public class MRAController { List<Account> Acts = [Select a.Name, (Select Id , Name, CreatedDate From Opportunities ORDER BY CreatedDate DESC LIMIT 1), (Select Title, CreatedDate From NotesAndAttachments ORDER BY CreatedDate DESC LIMIT 1), (Select Description, CreatedDate From ActivityHistories ORDER BY CreatedDate DESC LIMIT 1) From Account a WHERE OWNERID ='00570000003FI8tAAG' LIMIT 1]; List<Account> Acts2 = [Select a.Name, (Select Id, Name, CreatedDate From Opportunities ORDER BY CreatedDate DESC LIMIT 1), (Select Title, CreatedDate From NotesAndAttachments ORDER BY CreatedDate DESC LIMIT 1), (Select Description, CreatedDate From ActivityHistories ORDER BY CreatedDate DESC LIMIT 1) From Account a WHERE OWNERID ='00570000002ZCzzAAG']; public List<Account> getActs(){ return Acts; } public List<Account> getActs2(){ return Acts2; } }

<apex:page sidebar="false" controller="MRAController" >
<apex:form >   
 
    <apex:tabPanel activeTabClass="Blue" switchtype="ajax" >
    <apex:tab label="Jim Bridger" LabelWidth="100" id="tb1"><apex:pageBlock >
    <apex:pageBlockTable value="{!Acts}" var="a" ID="table">
    <apex:Column value="{!a.ID}" Width="120"/>
    <apex:Column value="{!a.Name}"/>
    </apex:pageBlockTable>
    </apex:pageBlock>
    </apex:tab>
 <apex:tab label="Jim Bridger 2" LabelWidth="100" id="tb2">
    <apex:pageBlock >
    <apex:PageBlockTable value="{!Acts2}" var="b">
    <apex:column value="{!b.ID}"/>
    <apex:column value="{!b.Name}"/>
    </apex:PageBlockTable>
    </apex:pageBlock>
    </apex:tab> 


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

I am having an issue displaying the opportunites

Right now I can only get the Account Information to display and can not get the Opportunity Information to display

Account Name - Opportunity ID - Opportunity Name - Note Title - Created Date - Activity Title - Created Date