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
Raquel RiemerRaquel Riemer 

OR in VF???

I have a picklist field that i want to select if it is one of two choices in an Apex Class that I am using to render a VF page

WHERE (OR(BL_Registration_Status__c = 'Accepted',BL_Registration_Status__c = 'Registered for AMHSI') )) 

I got this error
Error: Compile Error: Unexpected token 'OR'. at line 6 column 147

so I tried

WHERE (BL_Registration_Status__c = 'Accepted' || BL_Registration_Status__c = 'Registered for AMHSI' )) 

and I got this error

Error: Compile Error: Expecting ')' but was: '||' at line 6 column 186
Raquel RiemerRaquel Riemer
figured it out 

WHERE (BL_Registration_Status__c = 'Accepted' OR BL_Registration_Status__c = 'Registered for AMHSI' )) 
sachinarorasfsachinarorasf
Hi Raquel,

Please use the below link to get your answer.
https://developer.salesforce.com/forums/?id=906F0000000917aIAA

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Sachin Arora
www.sachinsf.com