Repository navigation
Error in parsing Rollup Query Condition #746
Closed
andreasoppermann
started this conversation in
General
Replies: 1 comment
|
It sounds like you have a typo in your where clause, as the condition that you've pasted works perfectly. You can test this for yourself: @IsTest
static void worksWithClausesThatEndWithIn() {
String whereClause = 'StageName IN (\'None\',\'Scheduled\',\'Dispatched\',\'In Progress\')';
RollupEvaluator.WhereFieldEvaluator eval = new RollupEvaluator.WhereFieldEvaluator(whereClause, Opportunity.SObjectType);
System.assertEquals(true, eval.matches(new Opportunity(StageName = 'None')));
System.assertEquals(true, eval.matches(new Opportunity(StageName = 'Scheduled')));
System.assertEquals(true, eval.matches(new Opportunity(StageName = 'Dispatched')));
System.assertEquals(true, eval.matches(new Opportunity(StageName = 'In Progress')));
System.assertEquals(false, eval.matches(new Opportunity(StageName = 'In Something Else')));
} |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi @jamessimone,
thank you for this awesome package, great work!
I have configured a rollup in CMDT using the condition: Status IN ('None' , 'Scheduled' , 'Dispatched' , 'In Progress').
Now the code in the RollupEvaluatorClass is confused about the word 'In' in the 'In Progress' status value.
It fails at line 401 while this code is executed:
AI is telling me this regex would do the trick: if (Pattern.matches('(?i).*\b(in|includes)$', criteria))
Thank you!
Kind Regards,
Andreas
All reactions