Hi everyone,
I'm trying to build a COQL query that includes conditions on multiple lookup fields.
Each condition works perfectly on its own — and also the condition on the Payment_Date field works fine.
But when I try to combine two lookup conditions together, I get the following error:
{
"code": "SYNTAX_ERROR",
"details": {
"near": "where"
},
"message": "error occured while parsing the query",
"status": "error"
}
This version works fine:
select ... from Pyments
where Link_to_Vendor.id is not null
and Payment_Date between '2025-04-01' and '2025-04-30'
This also works:
select ... from Pyments
where Link_to_contact.id = 1234567890
and Payment_Date between '2025-04-01' and '2025-04-30
But this version fails:
select ... from Stipends
where Link_to_contact.id = 1234567890
and Payment_Date between '2025-04-01' and '2025-04-30
and Link_to_Vendor.id is not null
Is there a known limitation when combining multiple lookup conditions in COQL?
Is there a workaround?
Thanks in advance!