Do you tried to use a custom microflow on the button as submit button?
You can check the App Store, I think I remember there is a Module, which can check if the user trys to go back and can trigger then an action. Maybe you can take a look there.
Thanks for the response. I haven’t tried it. I have just started using mendix.
I can do that using custom microflow for save button. But then also how i can check if user click on back button without click on save button.
The back button shouldn't submit the data if it's the default button.
The save button also has an property with close page, so the pages automatically closes when the user presses save.
If you want other logic, you need to add a microflow to the button, which also commits the object.