OR clause in top level filter breaks SOQL query
aheber opened this issue · 2 comments
aheber commented
If you use an OR in your Rollup Filter it generates an invalid syntax.
I put in [criteria 1] OR [critiera 2]
and it gets transformed into [critiera 1] OR [criteria 2] AND parentlookup__c IN :listofparentids
Should improve the tool to either always enclose the criteria in parenthesis or to look for " OR " and enclose if found. I'm not sure there is any risk or penalty to always enclosing.
I'm happy to do the dev work but would appreciate any feedback before going forward.
afawcett commented
Thanks @aheber , yeah looks like some brackets to be added here https://github.com/afawcett/declarative-lookup-rollup-summaries/blob/master/rolluptool/src/classes/LREngine.cls#L189
afawcett commented
Fixed in v2.11