Issue with MultiPicklist field in where clause

  • 1
  • Question
  • Updated 3 years ago
I have multiselect picklist called as Profile . and i have included condition in my model as - 

Profile includes (userinfo) Profile Name.

but while loading page i am getting following error.

An error occurred while attempting to perform the following SOQL query:

SELECT ,Name,CreatedDate,Id FROM SObject1 WHERE (Active__c = true)AND(Id not in (SELECT Alert_Name__c FROM SObject2 WHERE (((User_Name__c = '005R0000001omWyIAI')))))AND(Category__c = 'Priority Alert')AND(Profile__c includes 'System Administrator')AND(Currently_Active__c = true)

Error:expecting a left parentheses, found 'System Administrator'
Photo of Sumeet Sangle

Sumeet Sangle

  • 452 Points 250 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,320 Points 5k badge 2x thumb
Hi Sumeet, 

Which model is your condition on? Did you populate the multi-select picklist or is it a standard field on a standard object?