You need to sign in to do that
Don't have an account?

Apex:repeat two time
Hi @ all,
I have a visualforce page with the standardController to a custom object.
I want to get all orders (Orders__c) from a event (Event__c). I started by the offer (Offer__c)
Offer is in master-detail with the event and the event is in master-detail with the orders.
I have tried two following codes:
"Aggregate Relationship is used in an unsupported complex expression containing 'Event__r.orders__r'"
And...then I have trief to save the event and use a new variable to "repeat" all orders. I get no error message, but a error in Salesforce
SObject row was retrieved via SOQL without querying the requested field: Event__c.Orders__r
Is someone able to help me?
I cannot explain it and work on it since a few hours....
Thank you and best,
Lisa
I have a visualforce page with the standardController to a custom object.
I want to get all orders (Orders__c) from a event (Event__c). I started by the offer (Offer__c)
Offer is in master-detail with the event and the event is in master-detail with the orders.
I have tried two following codes:
<apex:page standardController="Caterer_Offer__c" sidebar="false" showHeader="false" > <apex:repeat var="events" value="{!Caterer_Offer__c.Event__r}"> {!events.Name} <apex:repeat var="orders" value="{!events.Orders__r}"> <!-- {!orders.Name}--> </apex:repeat> </apex:repeat> </apex:page>At this the error-message in the developer console is:
"Aggregate Relationship is used in an unsupported complex expression containing 'Event__r.orders__r'"
And...then I have trief to save the event and use a new variable to "repeat" all orders. I get no error message, but a error in Salesforce
<apex:page standardController="Caterer_Offer__c" sidebar="false" showHeader="false" > <apex:repeat var="events" value="{!Caterer_Offer__c.Event__r}"> {!events.Name} <apex:variable var="e" value="{!events}"/> <apex:repeat var="orders" value="{!e.Orders__r}"> <!-- {!orders.Name}--> </apex:repeat> </apex:repeat> </apex:page>Error-message:
SObject row was retrieved via SOQL without querying the requested field: Event__c.Orders__r
Is someone able to help me?
I cannot explain it and work on it since a few hours....
Thank you and best,
Lisa