+ Start a Discussion

OFFSET not being recognized in 27.0 API

I'm having a really bizarre experience with the OFFSET clause.  Sometimes when I save the class in Eclipse with the below SOQL query in it, it saves to my sandbox org with no error.  Other times, I get an error saying "expecting right square bracket, found 'OFFSET'".  There doesn't seem to be any rhyme or reason for when it does and doesn't throw the error.  And, more bizarrely, it appears to be successfully saving to my sandbox org in spite of the error.


The apex class is using the 27.0 API and I have had SF support enable the OFFSET soql functionality to my production and sandbox orgs.  I'm using the latest version of Eclipse 3.5.2.  Any ideas?


members = [select Id, ContactId, LeadId, Status, CampaignId, Level_of_Interest__c, 

                    Last_Action__c, Next_Action__c, Campaign.Name,

                    Lead.Id, Lead.Salutation, Lead.Title, Lead.Name, Lead.Company, Lead.Phone, 

                    Lead.Street, Lead.State, Lead.Email,

                    Contact.ID, Contact.AccountId, Contact.Salutation, Contact.Title, Contact.Name

                    Contact.Phone, Contact.MailingState, Contact.Email, Contact.Account.name

                    from CampaignMember where CampaignId = :camp AND Next_Action__c LIKE :desiredNA AND 

                    (NOT Next_Action__c LIKE :excludedNA) AND Level_of_Interest__c LIKE :desiredLI AND 

                    (NOT Level_of_Interest__c LIKE :excludedLI) AND

                    (NOT Contact.Account.name LIKE 'Remove from SF'

                    AND (Contact.Account.Name LIKE :searchFilter OR Contact.Name LIKE :searchFilter

                    OR Lead.Name LIKE :searchFilter OR Lead.Company LIKE :searchFilter OR 

                    Lead.Email LIKE :searchFilter OR Contact.Email LIKE :searchFilter OR

                    Contact.Title LIKE :searchFilter OR Lead.Title LIKE :searchFilter 

                    OR Contact.MailingState LIKE :searchFilter OR Lead.State LIKE :searchFilter) 

                    ORDER BY Contact.Account.name LIMIT 200 OFFSET 200];

Rahul SharmaRahul Sharma
If you have not logged in case in Salesforce support already then, Please log one. They could provide you with the exact cause or solution or workaround.

Mean while you could wait for reply from another community members for some ideas over here.
Nitin JainNitin Jain

Please change the meta data of the class.


Change the tag "<apiVersion>27.0</apiVersion>" to "<apiVersion>28.0</apiVersion>".



Any solution to this?  I keep getting this error.

Nitin JainNitin Jain

Please change the meta data of the class.


Change the version from "27.0" to "28.0".