Why do I get a DisjunctionsNotSupportedException when doing a SOQL query on Custom Metadata?
Custom Metadata supports a limited SOQL syntax, and "OR" statements are not supported. From the documentation:
Custom metadata types support the following SOQL query syntax.
SELECT fieldList [...]
FROM objectType
[USING SCOPE filterScope]
[WHERE conditionExpression]
[ORDER BY field {ASC|DESC} [NULLS {FIRST|LAST}] ]
- The fieldList can include only non-relationship fields.
- FROM can include only one object.
- You can’t use COUNT with custom metadata types.
- You can use the following operators.
- IN and NOT IN
- =, >, >=, <, <=, and !=
- LIKE, including wild cards
- AND
- You can use ORDER BY, ASC, and DESC with multiple fields.
Notice that "OR" is not supported. Apparently that's called a "Disjunction"