function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
uxtx_timuxtx_tim 

Visual Force error - inconsistent for different users - cannot sort field in a query call

 

Developed a quick test page to display data on a custom object named  Receiving.  Im using a list controller to display all entries and it works fine when I visit the url of the page from my machine.
However, my colleague gets the following error:
Visualforce Error
T_Data__c FROM Receiving__c ORDER BY S_ID__c ASC LIMIT 10000 ^ ERROR at Row:1:Column:67 field 'S_ID__c' can not be sorted in a query call
It's important to note that my colleague created the custom object to begin with.
Why would the page behave for me and not for someone else?
Here's the code - not much to it.
As you can see it's using the standardController which I'm guessing is responsible for generating the SOQL query.  
<apex:page standardController="Receiving__c" recordSetVar="entries" showHeader="false">
<apex:pageBlock >
    <apex:pageBlockTable value="{!entries}" var="entry">
        <apex:column value="{!entry.name}" />
        <apex:column value="{!entry.S_ID__c}" />
        <apex:column value="{!entry.T_Data__c}" />  
    </apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Visualforce Error
T_Data__c FROM Receiving__c ORDER BY S_ID__c ASC LIMIT 10000 ^ ERROR at Row:1:Column:67 field 'S_ID__c' can not be sorted in a query call

 

Best Answer chosen by Admin (Salesforce Developers) 
uxtx_timuxtx_tim

to follow up on this - i had to open a ticket with SF support.  they attributed it to a 'view error' and corrected.  thanks guys!

All Answers

uxtx_timuxtx_tim

to follow up on this - i had to open a ticket with SF support.  they attributed it to a 'view error' and corrected.  thanks guys!

This was selected as the best answer
pramod852pramod852

Can you provide me the case number,which you were logged.