Difference between standard save button, commit object and change object.

3
Assumptions are the mother of all F* ups. Lets say we have a form with a main object and several referenced objects. When I use the standard save button all the enclosed data objects are also savedl. Now I change the standard save button for a custom microflow. I assumed that when I do a commit on the main object with the commit object (s) action the enclosed data object of this main object would also be saved. My assumption that the action commit object(s) was the same as when I used the standard save button seems to be wrong. The enclosed objects are not automaticly saved. In the action change object I also can commit the object. Within some of our projects we have seen the behaviour that when using custom microflows where we used the change action to change and commit the object some references that where set earlier in the proces or in the form would not be saved (only the changes of the object itself and the references in that action, but not the references set earlier). As a precaution we now use the commit oject(s) action at the beginning of a microflow to make sure that everything is saved. We think this is a bug but this problem is very hard to debug and create a testproject for while we can easily solve it by using the commit object(s) action (but my gut feeling still says there is a possible bug there somewhere). Could somebody from Mendix elaborate on the differences between these actions? I assumed that the commit object(s) action would commit the object and also would commit all changed referenced objects (why else name it with the (s) on the end?) and that it would do the same as the save button. What is the difference exactly? Regards, Ronald
asked
3 answers
3

Ronald

  • I think CommitObject(s) has the s on the end because you can pass it an object or a list of objects of the same type.
  • Also, my thoughts on your question are that the two different functionalities offer me additional development options. If I want to commit a number of different objects on one form all at once, I can use the standard Save button. If I want to have more fine-grained control over what happens with objects on a form, I can use a custom microflow.

I would favor keeping things as they are, so that I have both options available to me. These are just my thoughts on your question.

Mike

answered
1

I know this is an old question, but I really wish Mendix would clarify this in the docs. This is an absolutely massive footgun.

 

Between this and auto-commit, they both feel like very ‘leaky’ abstractions.

answered
0

https://forum.mendix.com/link/space/studio-pro/questions/122493

answered