You need to sign in to do that
Don't have an account?

System.QueryException: expecting a right parentheses, found 'OFFSET'
i am running soql query dynamically using search.query() and i am facing error
System.QueryException: expecting a right parentheses, found 'OFFSET'
my query is
FIND 'USA' IN ALL FIELDS RETURNING Account (SicDesc,ParentId,TickerSymbol,LastModifiedDate,NumberOfEmployees,NumberofLocations__c,ShippingCity,ShippingLatitude,BillingLongitude,Jigsaw,BillingCountry,ShippingCountry,Site,AccountNumber,BillingStreet,Active__c,LastViewedDate,BillingCity,ShippingLongitude,Rating,CreatedById,IsDeleted,Id,ShippingPostalCode,Industry,UpsellOpportunity__c,AccountSource,Phone,SLAExpirationDate__c,Type,OwnerId,ShippingState,BillingLatitude,AnnualRevenue,BillingState,LastActivityDate,BillingPostalCode,SystemModstamp,SLASerialNumber__c,Description,LastReferencedDate,LastModifiedById,Website,ShippingStreet,Fax,SLA__c,CustomerPriority__c,MasterRecordId,Name,CreatedDate,JigsawCompanyId,Sic,Ownership ORDER BY Name OFFSET= 0 LIMIT 5)
i tried many things but every time i am getting some error can any one please tell what should be the right query for selecting 5 accounts with offset 0 including all fields ??
I am not sure about them. I guess they are related to SOQL.
can you remove them and try again ?
Hi Ritesh,
I think OFFSET doesn't work with SOSL queries.
You can refer to SOQL & SOSL guides for same.
You can try it by removing OFFSET clause.
Thanks,
Sachin.