-
Notifications
You must be signed in to change notification settings - Fork 95
Description
I'm having trouble with a query that filters on multiple lookup fields from $CurrentRecord.
I'm trying this: SELECT fields FROM object WHERE Id IN ($CurrentRecord.Lookup_1__c,$CurrentRecord.Lookup_2__c,$CurrentRecord.Lookup_3__c)
Use case is a record that has 3 lookup fields to the same object (for business reasons this made more sense than a junction obj), and I'd like to display a read-only datatable of the (1-3) records.
The datatable shows correctly when a record has all 3 lookups populated. However, if only two are populated, it shows no records and instead says Invalid SOQL String invalid ID field: null
But if I remove the third lookup field from the filter, it shows both records as it should.
(I get the same error if I use OR instead of IN() for the filter)
Any insight? Thanks!