You need to sign in to do that
Don't have an account?
goabhigo
Aggregate Relationship is used in an unsupported complex expression
This is my VF code:
<apex:dataTable value="{!Order__c.Opportunity__r.OpportunityLineItems}" var="d">
<apex:column headerValue="Desc" value="{!d.Description}"/>
</apex:dataTable>
I am receiving an error: Error: Aggregate Relationship is used in an unsupported complex expression containing 'opportunity__r.opportunitylineitems'
Order__c is a custom object which has master-detail relationship with opportunity. I am trying to display the OpportunityLineItem details in a VF page on click of a button(Generate Order, present in Order detail page).
Can anybody explain whats wrong?
It looks like this message is coming from whatever code is used to generate the SOQL query from the page. I've tried various ways to split the reference (using apex:variable or a custom component) but no dice.
The only way I could get this to fly was using two separate pages and an apex:iframe.
Page 1:
Page 2 (named AggTestPage2):
Not ideal but does this work for you?
All Answers
I know it is very easy to do this with apex but I am using PE. So I cannot write apex code.
So within visualforce code is this achievable?
Please suggest.
It looks like this message is coming from whatever code is used to generate the SOQL query from the page. I've tried various ways to split the reference (using apex:variable or a custom component) but no dice.
The only way I could get this to fly was using two separate pages and an apex:iframe.
Page 1:
Page 2 (named AggTestPage2):
Not ideal but does this work for you?
You are my champ!! Thanks.
Couple of codes........ and it worked like a dream. But you showed me the green flag to start.
Thanks again.
Hi
I tried the above and it works providng you are rendering as a normal page, however im trying to render the resulting page with the iframe as a PDF.
The <apex:iframe> object doesn't work when redering as PDF , so how would one go about displaying the content which is effectively two relationships down from the first page controller using objects which are ok to be rendered as PDF?
Thanks
Gary
I am wondering the same thing - as far as using Bob's suggestion above (it works), but have the resulting page be rendered as a PDF.
I know this post was done 3 years ago, but does anyone know a solution to this?
Thanks!
This can also be achieved with a component.
On your VF page:
The component:
The controller:
So here is my issue, and I am desperate for a solution, it works great on a visual force page but I can not figure out how to get it to work on a visualforce email template. The above code requires <apex:page standardController="Case"> which an email template will not accept. Any solution?
CG