Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOQL Query on a multi-select picklist #37

Open
kpapagno opened this issue Feb 9, 2020 · 0 comments
Open

SOQL Query on a multi-select picklist #37

kpapagno opened this issue Feb 9, 2020 · 0 comments

Comments

@kpapagno
Copy link

kpapagno commented Feb 9, 2020

My client has a custom field Contact_Type__c which is a multi select picklist. When doing a query, the field returns a string with "A;B;D" indicating the field has been selected with A, B, and D (but not C).

When doing an eloquent query, I can do a standard $query->where('Contact_Type__c','A') but the only records returned are the ones with only A selected. If they have more than one selected, the record is not returned. A "like" statement does not work either, with a hard error about it being a multi select picklist field.

Research found the correct SOQL way to do this is an "Includes" statement as described in this Salesforce KB article.

Example:
Select Id, Name, Contact_Type__c from Contact where Contact_Type__c includes ('Coach')

Is there any support for this is the package?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant