Hi everyone, The situation of my widget is like this: - I have two mendix objects. - The first object is in readonly mode. However, i still use the "set" function, to set one of it attribute to a new value (so when I open the edit form, it will show my expected value). The edit form will show only the cancel button, which is correct. Then I click the cancel button. Until now, everything seems fine. - I call one microflow, which take guid of the second object as input. So i see one weird thing is: - It seems that Mendix tries to send the changes of my first object (which is readonly) together with the call of microflow. I see something like when inspecting the request:
action: "executeaction"
changes: {80783318315960173: {firstObjectAttribute: {value: "89227567617309553"}}}
params: {applyto: "selection", guids: ["244038804808154955"],…}
- Then thing goes wrong here since the first object is readonly now and of course, it's impossible to apply the changes. So my question is: is there any way to - reset the first object to it original state so there will be no "changes" sent with the microflow. I tried something like this to set all attributes to their original values. However, "changes" is still there.
(trackObject)
.getReferenceAttributes()
.filter((attrRef: string) => (trackObject).getOriginalValue(attrRef) !== trackObject.get(attrRef))
.forEach((changedRefAttr: string) => trackObject.set(changedRefAttr, (trackObject).getOriginalValue(changedRefAttr)) - or any options to say that " call microflow on this object, but don't send any temporary changes of other objects". Best regards,
↧