I ran into this issue myself and it seems to be Mendix's intended behavior, but I can't say for sure since I don't work for them.
But I will say it's not something you're doing wrong, and can also attest to this behavior.
For me, It seems like a bug more than an intended behavior. A workaround could be found if you inspect the request from a microflow which takes list as paramter when you config datagrid as multiple-selection. It will look like this:
{"action":"executeaction","params":{...","applyto":"selectionset","xpath":"//MyFirstModule.Entity","constraints":"[id=\"4785074604081155\"]",...,"actionname":"MyFirstModule.microflow_multiple"}...}}
I have this too with my new DataTables widget. Workaround is simple: define both a list and object parameter of your entity and check which one is not empty.
A model share: https://modelshare.mendix.com/models/32a4267e-3514-4809-b57f-9f44b2524468/example-of-js-function-calling-mf-with-list-parameter
workaround
mx.data.action({
params:{
actionname: microflow,
applyto: "selectionset",
//guids: guids,
xpath: "//MyFirstModule.Entity"
sort:[["id","asc"]],
constraints:arrayToConstrains(guids)
}
});
Does anyone have offical solution for this issue yet.
It still happens in mx5.21.2 and I can't use the workaround