"Where clause entered incorrectly" error trying to run converted dlrs rollup
sweinrarw opened this issue · 3 comments
I re-created this as a rollup using the core action just to confirm it wasn't something with the cmdt.
parent is account, child records are contacts.
The soql filter included is Status__c != 'Inactive' AND Status__c != 'Nonqualified' AND Account_Status__c !='Inactive' AND Account_Status__c !='Nonqualified'
Status__c is a picklist, Account_Status__c is a formula field so I'm wondering if that has something to do with the error? I took the formula field out and it was able to run successfully.
I was able to run a soql query with that exact string included just to confirm i wasn't losing it.
Full error received is below:
System.IllegalArgumentException:
Where clause entered incorrectly: Status__c != 'Inactive' AND Status__c != 'Nonqualified' AND Account_Status__c !='Inactive' AND Account_Status__c !='Nonqualified'
Exception: List index out of bounds: 13 Class.RollupEvaluator.WhereFieldEvaluator.recursivelyCreateConditions: line 392,
column 1 Class.RollupEvaluator.WhereFieldEvaluator.createConditions: line 294, column 1
Class.RollupEvaluator.WhereFieldEvaluator.: line 239, column 1 Class.RollupEvaluator.getWhereEval: line 30, column 1
Class.Rollup.getFullRecalcQueryWrapper: line 2170, column 1 Class.Rollup.processCustomMetadata: line 2119, column 1
Class.Rollup.performRollup: line 847, column 1
@sweinrarw you need a space between the !=
and the last two conditions:
- Account_Status__c !='Inactive' -> Account_Status__c != 'Inactive'
- Account_Status__c !='Nonqualified' -> Account_Status__c != 'Nonqualified'
While no spaces is valid for SOQL, it's not valid within Apex Rollup's version of filtering. Thanks!
ahhh derp, I didn't even notice that, must have been entered that way in dlrs and I never noticed!
Thanks for the speedy reply
No problem!