I am very new to salesforce development and was trying to develop an inline VF page inside a standard page. So basically my inline VF section should contain child opportunties for an account. I have wrote the below page and controller extension but for some reason the records are not returned in the pageblock table.

<apex:page standardController="Account" extensions="OptyListCtrl">
<apex:pageBlock title="Opportunities">
<apex:pageBlockTable value="{!Optys}" var="opty">
    <apex:column headerValue="Name" value="{!opty.Name}"></apex:column>
    <apex:column headerValue="Close Date" value="{!opty.CloseDate}"></apex:column>
    <apex:column headerValue="Stage Name" value="{!opty.StageName}"></apex:column>


public class OptyListCtrl {
    public account acc;
    public list<Opportunity> Optys { get; set;}
    public OptyListCtrl(ApexPages.StandardController sc) {
        this.acc = (Account)sc.getRecord();
    public list<Opportunity> getOptys(){
       return [select Name,StageName,CloseDate from opportunity where AccountId=:acc.id];

1 Answer 1


In this case, your controller extension has two getters for the Optys property and that is the problem. If you comment out this line, your extension should work:

//public list<Opportunity> Optys { get; set;}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .