home Homebuild Toolsbug_report Errorsmenu_book Guideslightbulb Tipssmart_toy Promptsextension Extensionsfolder_open Resourcesinfo About
search
error

MALFORMED_QUERY: Field is not a relationship field or does not support INCLUDES

What does this error mean?

The INCLUDES and EXCLUDES operators in SOQL are exclusively designed for Multi-Select Picklist fields. These fields store multiple values in a semicolon-separated string, and INCLUDES checks whether a specific value is present among the stored values. Using these operators on any other field type — standard picklists, text fields, lookups — produces this error.

Common Causes

1. Using INCLUDES on a standard (single-value) Picklist

Standard picklists hold one value and use = or IN for filtering. INCLUDES is not applicable.

2. Using INCLUDES on a Text field

Attempting to use INCLUDES to check for substring presence in a text field — use LIKE '%value%' instead.

3. Field type changed without updating queries

A field was originally a Multi-Select Picklist but was converted to a standard Picklist, leaving old queries with INCLUDES that now fail.

How to Fix It

Solution: Use the correct operator for the field type

SOQL
-- ❌ INCLUDES on standard Picklist — wrong operator
SELECT Id FROM Account WHERE Industry INCLUDES ('Technology')

-- ✅ Standard Picklist — use = or IN
SELECT Id FROM Account
WHERE Industry IN ('Technology', 'Software')

-- ✅ Multi-Select Picklist — INCLUDES is correct
SELECT Id FROM Campaign__c
WHERE Channels__c INCLUDES ('Email', 'Social')

-- ✅ EXCLUDES — Multi-Select Picklist only
SELECT Id FROM Campaign__c
WHERE Channels__c EXCLUDES ('Print')

How to verify a field is a Multi-Select Picklist

Go to Setup → Object Manager → [Object] → Fields & Relationships → find the field → the Data Type column shows either "Picklist" (standard) or "Picklist (Multi-Select)". Only the latter supports INCLUDES / EXCLUDES.

lightbulb

Pro Tip: When querying Multi-Select Picklist values in Apex, remember that stored values are semicolon-separated strings like 'Email;Social;Print'. Use INCLUDES in SOQL (not LIKE) for reliable multi-value matching — LIKE '%Email%' would falsely match 'Email Marketing'.