Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*ConvertDatetoDatetimeFlowAction.cls* - When called from a flow doesn't bulkify properly and sets bad data if used from an import #1286

Open
lorengd opened this issue Dec 2, 2022 · 1 comment
Assignees

Comments

@lorengd
Copy link

lorengd commented Dec 2, 2022

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Create a record triggered flow that calls this action: https://unofficialsf.com/convert-date-to-datetime-flow-action/
  2. Trigger the flow for multiple records at once using an import.
  3. The value calculated for the last record through will be saved for all records.

Expected behaviour

It should properly save the right value for each record.

Actual behaviour

It saves the value of the last record through on all records.

Line 46 needs to be moved inside the for loop. Then it works properly.

@StreckerCM
Copy link
Contributor

@ericrsmith35 I was getting flow errors because one of the dates needed to be before the other, and I have a validation to enforce that. I debugged the flow and found that the date to datetime conversion output was giving unexpected results.

For Example, 4/8/2021 got output as 4/27/2021
Unexpected_Output_Example

I came here to see if this had been reported and found this open issue. I tested the proposed solution of moving the response variable inside the for loop and re-tested the flow that was throwing errors, and all of the records were processed without any errors this time.

I created PR #1459 to patch this issue, but it needs to be reviewed since I am not a contributor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants