So, I am coming back one more time to the same subject (already asked in https://forum.mendix.com/link/questions/97351). Now, I have used the following microflow to produce a global variable (= an entity with just one object): https://stackoverflow.com/questions/55794490/how-to-declare-a-global-variable-in-mendix: However, the change object action in the end “sees” only the “SOE_CabinetObject”, and not the “NewSOE_CabientObject”. That means that in case the “SOE_CabinetObject” is empty and the new one is created (“NewSOE_CabientObject”), it cannot be passed to change object action, so I receive an Error “Change object should not be null” once again….. How should it be done correctly..?
It doesn't see the object after the merge since it's also possible it would have taken the MyFirstModule.SOE_Cabinet route. In that case the new object wouldn't exist. So if you want to prevent doing the change object action twice you could use a sub microflow and call this from both the empty line part and the Cabinet line part and pass either the SOE_CabinetObject or the NewSOE_CabinetObject.