• sbeniwal
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies

I am just trying to understand the data iteration. Here is a snippet from visualforce documentation:

 

<apex:page standardController="Account">
   <apex:pageBlock title="Contacts">
      <apex:pageBlockTable value="{!account.Contacts}" var="contact">
         <apex:column value="{!contact.Name}"/>
      </apex:pageBlockTable>
   </apex:pageBlock>
</apex:page>

 

What I want to know is: how does this related in the context of custom objects? Let's say I have a parent object TestCase and another child object TestCaseReview. I am trying to do the below, but it is failing:-

 

<apex:page standardController="TestCase__c">        
        <apex:pageblock TITLE="Test">                           
              <apex:pageBlockTable value="{!TestCase__c.TestCaseReview__c}" var="tst">
                 <apex:column value="{!tst.Remarks__c}"/>
              </apex:pageBlockTable>
        </apex:pageblock>        
</apex:page>

 

Please help. Thanks.

Hi there,

 

I am trying my hands on Visualforce and it's a very basic question. While on the Account controller, if I am pulling the account details such as CreatedBY it gives me the record ID and not the name. Similary, I am not able to print the TickerSymbol.

 

Here is the code - please help out.

<apex:page standardController="Account">
    Hello {!$User.FirstName}. <BR/>
   
    The current Account {!Account.Name} record has been created by: {!Account.CreatedBy}. The industry of the account is: {!Account.Industry}<BR/> The ticker symbol for the account is {!Account.TickerSymbol}
   
</apex:page>

 

PS: Should I be writing a Controller extension with the SOQL in it.

Select Username, Manager.Name from User

Hi there,

 

I am trying my hands on Visualforce and it's a very basic question. While on the Account controller, if I am pulling the account details such as CreatedBY it gives me the record ID and not the name. Similary, I am not able to print the TickerSymbol.

 

Here is the code - please help out.

<apex:page standardController="Account">
    Hello {!$User.FirstName}. <BR/>
   
    The current Account {!Account.Name} record has been created by: {!Account.CreatedBy}. The industry of the account is: {!Account.Industry}<BR/> The ticker symbol for the account is {!Account.TickerSymbol}
   
</apex:page>

 

PS: Should I be writing a Controller extension with the SOQL in it.

Select Username, Manager.Name from User