You need to sign in to do that
Don't have an account?
ptamk
But this one doesnt
And fails with the following error
StandardController ListView Problem
Hi I have two custom objects in my org Quick_Quote_PRM__c and Payment_Credit__c
Both use the standardcontoller to display listview as follows
This one works
Code:
<apex:page showHeader="false" standardController="Quick_Quote_PRM__c" recordSetVar="pcs" > <apex:form id="theForm"> <apex:outputLabel value="Select Payment View:" for="selectList"/> <apex:selectList value="{!filterId}" size="1" id="selectList"> <apex:actionSupport event="onchange" rerender="list"/> <apex:selectOptions value="{!listviewoptions}"/> </apex:selectList> </apex:form> </apex:page>
But this one doesnt
Code:
<apex:page showHeader="false" standardController="Payment_Credit__c" recordSetVar="pcs" > <apex:form id="theForm"> <apex:outputLabel value="Select Payment View:" for="selectList"/> <apex:selectList value="{!filterId}" size="1" id="selectList"> <apex:actionSupport event="onchange" rerender="list"/> <apex:selectOptions value="{!listviewoptions}"/> </apex:selectList> </apex:form> </apex:page>
And fails with the following error
FROM Payment_Credit__c ORDER BY Name.Alias ASC LIMIT 10000 ^ ERROR at Row:1:Column:43 Didn't understand relationship 'Name' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.
As can be seen there is no custom soql. Im not even referencing 'Name' ?
Is there some way to see what the query is been built by the standard controller ?
Any other ideas on how to debug ?
Thanks
Paul
The problem appears to be that if I put a field that is a lookup in the first column of the view it generates invalid soql.
ie if the account (which is a lookup up to the account object) is placed first in the list view then it generates invalid soql.
SHouldn't you use a different recordset for each column if you're using those two snippets together?