I'm performing this query against a Custom Metadata object:
SELECT Call_Center_Display_Script__c
FROM VDN_Mapping__mdt
WHERE VDN__c = '99999' OR DNIS__c = '123456786'
LIMIT 1
But I'm getting this error from Salesforce:
An error has occurred in the following section: [Exception, DisjunctionsNotSupportedException_desc]. Salesforce.com has been notified of this error.
Why does this occur and how can I resolve this?
Best Answer
Custom Metadata supports a limited SOQL syntax, and "OR" statements are not supported. From the documentation:
Notice that "OR" is not supported. Apparently that's called a "Disjunction"