Setting Optimize network calls to Yes in project setting is not retrieving associated entity attribute values in Mendix 7.4.
After upgrading Mendix version from 6.9 to latest version 7.4, we observed that microflow retrieve activity is not fetching entity attribute values of an uncommitted entity. In our application, we display "Start Quote" button when all the mandatory field (Insured name and address details) are filled by the user. We are capturing insured name and address details in two different entities say A and B, and there is a middle entity C using which we traverse between an Insured entity (A) and address entity(B). Below image shows the captured address details: On the onchange event of insured name and address fields, we run a microflow to check whether all the details (insured name and address ) are filed by a user. In this flow, we observed that on the change of insured name the activity which retrieves the address entity is returning address object as expected but the attribute values are all empty though they are all filled. Below image show that address object retrieved with empty attribute values Entity A, B, and C are all not yet committed to the database; we commit them after the user clicks on start quote button. If we change "Optimize network calls" setting to "No" in project settings, then it works fine, but we see a performance issue with this setting. Is this a known issue to Mendix?
Mendix analyses microflows to determine what data it needs when it is called from the client. There are some cases where this analysis is not 100% correct because it cannot determine all the information needed. One example is when you are using java actions in a microflow. It looks like analysis of data required in microflows on entity events is also not 100% correct. The workaround is to disable the optimization. And as stated in the documentation, you can file ticket so we can have a look at your situation and improve the optimization analysis.
If this option is enabled (true by default), Mendix analyzes every microflow that can be triggered from the client to minimize the number of objects required to be sent. This speeds up your app significantly.
If you experience an issue while running your app in which objects seem to be lost, this option can be disabled to resolve that issue. If this resolves the issue, please file a bug report so that we can fix the issue in the platform.