<-- Back

Default save changes event commits all associated objects

Issue

When using multiple associated objects in data views on one page, the default Save Changes event commits all objects displayed in the editable data views, even if no changes were made to some of these data views. This behavior prevents users from using the standard save functionality on pages with more than one data view.

Environment

Studio Pro (all versions)

Cause

Mendix uses a single transaction to handle all changes made on a page during a user interaction, such as clicking the default Save button. This approach ensures data consistency across related objects as it commits all editable widgets on the page to the database, even if an object has no changes or associations. This behavior is intentional and is part of Mendix’s design to simplify development and maintain consistency.

Solution/Workaround

If users require more granular control over which objects are committed, it is recommended to use a button with an on-click event that calls a custom save microflow (create a microflow that commits only the specific objects that have changes), rather than using the default Save button.


Example: Create an ACT_Object_Save microflow that commits only the specific object after performing necessary validations.

Internal information related

  • 229728
  • C0A5EDRD2/p1729513736783139

Additional information 

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.