cancel button

0
when i click on cancel button , it is removing the already saved data. what should i do to not delete the data which is saved . when i click on cancel it should not delete the data which is saved.
asked
2 answers
1

In addition to Jeroen’s excellent answer, this link gives you a quick explanation of what the different types of action buttons actually do.

https://docs.mendix.com/refguide7/action-button/#events-properties

In your case, I think you need the Close Page action rather than Cancel as that will keep the data instead of rolling back.

I hope this helps.

answered
0

When using the cancel button, the default behavior is ‘cancel’. You can check the properties of the button to see if this is also the configuration for your button.

 

In general, the cancel action will perform a rollback. This means that all unsaved changes will be rolled back. Possibly, you think the data was saved before, but it's likely that it's not. Are you sure there was a commit (save) action somewhere between the moment the data was entered and the cancel button was used?

 

Please note that when not using the ‘cancel’ logic (for example, just a close page action), you end up with a dirty state. The user/client will see data which seems to be saved, but when retrieving it from the database later, it won't be there.

answered