Preventing Duplicate Entries: Form Saving Issue on Mendix Cloud

Hi all, I have encountered an issue on the Mendix cloud that I require some help with. I have created a form, and two different users of the same user roles can access the form at the same time. However, only one of them should be able to save the form. Currently, on the Mendix cloud, both users are able to simultaneously save the form, resulting in duplicate entries being made. Can someone suggest some solutions for preventing this from happening?
3 answers

base on your latest response, you can basically disable the x close form at global level. by adjust css 


.modal-header .close {
        margin-top: -2px;
       display: none;




        visibility: hidden;





You can create a boolean attribute which will act as a flag and set it to true on save of the form and add a check in the same flow to check if flag is true and add a information message to the user indicating that this form has already worked on etc.

So the changes from whoever saves the form first will be committed and the other users cant save the form as the flag will be true in their case.


(This is assuming that the same object is being worked on by both users)



you can use Locking Mechanism:

  • When a user opens the form, set a flag or attribute indicating that the form is being edited.
  • Only allow one user to set this flag at a time. If another user tries to access the form while it's being edited, notify them that the form is currently in use.