Prevent accidental duplicate tasks - Cloud

There is a bug in 2025.1 where sometimes when the user clicks a button in a panel card header, the event on that button fires twice instead of once. Without knowing when this bug may be addressed, I am trying to come up with a solution because sometimes the double firing is extremely problematic, for example, creating and sending two POs to the vendor, moving inventory twice, etc. Originally I thought moving the command to the action data of the panel card instead of a button dropped in the header would prevent this, but unfortunately I found that it does not.

I thought it might be possible to put an in transaction data directive on the SysTask table to check if a similar task is already running and if so, cancel the insertion of the task. But my logging shows that the directive only fires when the task is getting updated from Active to Complete, it never fires when the task is actually getting created in the first place.

My other idea is to try to build in a before-submit event in the layer itself, to try to do a check of the systask table at that point. Not sure if it will see the task running though, since its firing so fast the first task record may not exist in the systask table yet at that point in time. I really don’t want to put in a wait task and then check, because you don’t really know how long you would need to wait (so it would never be 100%) and would slow processing down. But that may be a measure of last resort.

Before I go all the way down that path, has anybody else come up with a solution to this that is working for them?

3 Likes

Can you catch the double-click events and do nothing? :thinking:

1 Like