Forum Discussion
- AdamKeever1Qrew CommanderWhen I use your code Kelly it performs the save as normal, creating only one record when used on a new record and creating no new record when used after editing an existing record.
What is the context in which you are using the save button and are seeing it create 2 records? - KellyBianchiQrew Assistant CaptainEvery record was duplicated. I'm not sure why. Oddly enough, I switched it out for code I had for another save button, which is essentially the same, and it was fine. Here's what I used...
var text bgcolor = "#4b72b0";
var text txtcolor = "white";
var text style = "style=\"text-decoration: none; background:" & $bgcolor & "; border-radius: 5px; padding: 10px 24px; margin-bottom:5px; width: auto; font-weight: normal; font-size: 12px; text-align: center; display: inline-block; color: " & $txtcolor & "; font: normal 700 24px/1 \"Calibri\", sans-serif;";
// End button style
"<a " & $style & " onclick='DoSaveAdd()'href='#'>Submit</a>"
Not sure why this would make a difference, but it did. - AdamKeever1Qrew CommanderI can't explain it. I get the same result with both buttons and do not experience the duplication that you experienced.
Glad you have a solution working properly for you. - KellyBianchiQrew Assistant CaptainThank you, it's weird, but I figured I would leave this up just in case someone else experienced the same thing. It happened all day as other users made entries and then I tested to verify. The minute I changed the code, it stopped.