alexed1 / LightningFlowComponents

A collection of unofficial Flow extensions that can be used to enhance Salesforce Flow and Orchestrator.
http://unofficialsf.com
Other
576 stars 574 forks source link

ExecuteSOQL Returning Same Results In Bulk Context #397

Open hayeswise opened 4 years ago

hayeswise commented 4 years ago

When ExecuteSOQL is run in a bulk context, it returns the same results for each invocation.
I've submitted a fix and updated tests with pull request #398.

alexed1 commented 4 years ago

Great cleanup. new version 1.3.3 available at https://unofficialsf.com/a-graphical-soql-query-builder-for-flow/

adwhite75 commented 4 years ago

@hayeswise I am getting a test failure with testExecuteSOQLMonthDayCommaYear

System.TypeException: Invalid date/time: 04/12/2020, 12:00 am

Class.ExecuteSOQL.getFormattedValue: line 134, column 1 Class.ExecuteSOQL.putFormattedValues: line 103, column 1 Class.ExecuteSOQL.replaceWithFormattedValues: line 77, column 1 Class.ExecuteSOQL.execute: line 14, column 1 Class.ExecuteSOQLTest.testExecuteSOQLMonthDayCommaYear: line 43, column 1

ericrsmith35 commented 2 years ago

@hayeswise I'm seeing this issue as well.

hayeswise commented 2 years ago

This test is a carry over from the May 4, 2020 ExecuteSOQLTest.cls file. And, it's a nice one to have since it tests that ExecuteSOQL can handle dates like "April 12, 2020". The Class.ExecuteSOQL.getFormattedValue function is no longer handling the conversion of the MMMM dd, yyyy format.

Class.ExecuteSOQL.getFormattedValue, lines 123 to 134, should be revisited with respect to the MMMM dd, yyyy format. For example, "April 12, 2020" gets converted to "04,12, 2020" then to "04/12/2020, 12:00 am". Then it is parsed.

Unfortunately, I don't have the time right now to fix this. Can someone else help?