Description
When a user clicks a form's Submit button more than once, multiple records are created in the UACT table.
Cause
There are two possible reasons that multiple records are created.
- A user clicks the Save button or Submit button multiple times.
- A user clicks the Save button and Submit button immediately one after the other.
Affected Versions
All
Solution
- Disable the buttons using JavaScript at the time of clicking either of them. In Cora SeQuence 8.x, you should also enable the single-click feature.
Example
<script type="text/javascript"> $( document ).ready(function() { $findByControlId("btnSave").set_enabled(true); $findByControlId("btnSubmit").set_enabled(true); }); function disableButtons(sender, args) { $findByControlId("btnSave").set_enabled(false); $findByControlId("btnSubmit").set_enabled(false); } </script> <sq8:Button runat="server" CommandName="SaveAll" CommandArgument="0" Text="Save" ID="btnSave" SingleClick="true" SingleClickText="Processing..." OnClientClicked="disableButtons"></sq8:Button> <sq8:SubmitButton runat="server" Text="Submit" Primary="True" ID="btnSubmit" SingleClick="true" SingleClickText="Processing..." OnClientClicked="disableButtons"></sq8:SubmitButton>