+ Start a Discussion
aka_floaka_flo 

Any ideas?

My company has SalesForce set up, so that we are tracking Accounts, which can have one or more Opportunities associated with them and then adding the pricing/quote information onto the Opportunity (into 2 separate custom objects).  Does anyone have any ideas on how I can create a page that will show the Account information at the top and then a summary of the proposal detail information of each of the opportunity on the same screen? 

 

I was not able to find a way to creating a Visualforce page that would allow me to traverse these objects using the standard controller (we are using the Professional Edition).  I look at the Console, but this only appears to go up the food chain instead of down.  I looked at creating a report, but I can't include the details from more than object at the child level.

 

Any suggestions would be greatly appreciated.  Thanks.

aballardaballard

Maybe I'm not understanding what you are trying to do, but the following code seems to meet the description.  (In this case, opportuniy has one custom object called test....)   The code loops over all the opportunities associated with given account.

 

<apex:page standardController="Account">
<apex:outputField value="{!Account.name}"/>
<br/>
<apex:repeat value="{!Account.Opportunities}" var="opp">
<apex:outputField value="{!opp.name}"/>
<br/>
<apex:outputField value="{!opp.test__r.name}"/>
<br/>
</apex:repeat>
</apex:page>

aka_floaka_flo

Thanks!  I thank I am heading in the right direction; however this is the error message I get:

Error: Could not resolve the entity from <apex:outputField> value binding '{!opp.applications__r.Application__c}'. <apex:outputField> can only be used with SObject fields. 

 

<apex:page standardController="Account">
<br/>
<apex:outputtext value="Account -- "/>
<apex:outputField value="{!Account.name}"/>
<br/><br/>
<apex:repeat value="{!Account.Opportunities}" var="opp">
<apex:outputField value="{!opp.name}"/>
<br/>
<apex:outputfield value="{!opp.applications__r.Application__c}"/>
</apex:repeat>
</apex:page>

Did I miss something?

aballardaballard

Not clear without seeing the definition of your custom objects and fields  Should it be application__r instead of applications__r ?