You need to sign in to do that
Don't have an account?
Mr.Brooks
I am getting "Expecting right square bracket, found 'OR'" error
I am trying to see why this error is occuring for my query. Help would be greatly appreciated.
List<ContentVersion> cv = [Select Title, portal_effective_date__c, Portal_Effective_Until_Date__c,description, filetype, createddate, isLatest, id, brand__c, state__c, region__c,
dealer__c from contentversion where ContentDocumentId in (SELECT ContentDocumentId FROM ContentWorkspaceDoc WHERE ContentWorkspaceId = :workspaceId)
and (Brand__C ='' and region__C = '' and state__c ='') OR region__C = :selRegion OR state__c = :acc.Physical_State__c OR
(region__C = :selRegion and state__c = :acc.Physical_State__c) and isLatest = true order by Title ASC];
List<ContentVersion> cv = [Select Title, portal_effective_date__c, Portal_Effective_Until_Date__c,description, filetype, createddate, isLatest, id, brand__c, state__c, region__c,
dealer__c from contentversion where ContentDocumentId in (SELECT ContentDocumentId FROM ContentWorkspaceDoc WHERE ContentWorkspaceId = :workspaceId)
and (Brand__C ='' and region__C = '' and state__c ='') OR region__C = :selRegion OR state__c = :acc.Physical_State__c OR
(region__C = :selRegion and state__c = :acc.Physical_State__c) and isLatest = true order by Title ASC];
(region__C = :selRegion and state__c = :acc.Physical_State__c)