Chaining error in ROQL for column value as null: "Attempted to set NULL as chained source ID"
We are using "chaining" supported by ROQL in /queryResults REST API. The result from the first query (the max Incident ID for the Contact) is dynamically passed to the second query to pull the Threads just for that Incident using the chain variable. It throws an error "This query is not supported: Attempted to set NULL as chained source ID" when there are no incidents for that contact id returning max(i.id) as null. Using SQL, we use nullif or coalesce function to check for the null value and assign some value to avoid this error, but I do not find any such function in ROQL. I've tried across all the groups here and I did not find any detailed documentation for ROQL. Appreciate it