My Before Commit Microflow Fires Twice When Save Button Is Clicked
Hi everyone. I've been having this issue all day now and I can't seem to figure out a fix. I have a Before Commit event handler set up on my entity. Whenever I hit the Save button on the corresponding form, the event handler triggers twice. However, when I use a normal Action button that calls the very same event handler microflow, it triggers just once. This is the only event handler on the entity, and there are no other commits that are happening within the event handler microflow itself. I've used Log Message activities to keep track of when and how often the event handler is being triggered. I've tested these scenarios and documented the result: Use the native Save button to save the form data. Result: the Before Commit event handler triggers just twice. Use a Custom Save button that mimics the native Save button functionality (commit the page object and close the page). Result: event handler triggers just once Use an Action button that retrieves an object from the entity and passes that object to the before commit microflow directly. Result: event handler triggers just once Use an Action button that retrieves an object from the entity and commits that object with events and refresh. Result: event handler triggers just once Remove before commit event handler, add after commit event handler, and repeat tests #1 and #2. Result when test #1: the After Commit event handler triggers twice. Result when test #2: event handler triggers once. I'm coming up with some inconsistent and weird results as you can see and I'm completed stumped as to what's happening. The Save button seems to be what's giving trouble here, but I just can't see how to fix it, short of just not using the native Save button. I don't necessarily want to take this route since the Save button is being used in many other aspects of the app across different entities. Can anyone out there help me?!? PS: I've tested this in a separate module of my app without the dual trigger. So I wonder if it might be something a little off with the module itself. I have no clue!