• Nitin Jain
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

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];