Call a microflow with Javascript

0
Hi, I am trying to execute a microflow in javascript with the mx.data.action method. Executing a microflow without any input parameters works fine, but  I struggle to pass an input parameter. The documentation shows this example: mx.data.action({ params: { applyto: "set", actionname: "MyFirstModule.GetFavoriteFood", xpath: "//MyFirstModule.Cat", constraints: "[id=281530811285515 or id=281530811285506]", origin: this.mxform }, callback: function(obj) { // expect single MxObject alert(obj.get("manufacturer")); }, error: function(error) { alert(error.description); } }, this); If I understand correctly; This will retrieve a list of MyFirstModule.Cat objects from the database with id=281530811285515 or id=281530811285506. This will then pass this list to the microflow MyFirstModule.GetFavoriteFood. Therefore I must add an input parameter to the microflow of type "List of MyFirstModule.Cat".   However, when I execute this method I receive this error: Invalid JSONRequest: JSONObject["sort"] not found.   What am I doing wrong here?   Thanks!      
asked
1 answers
4

Hi Koen,

I believe you have to add the sort property.
Have a look at this post for an example: https://forum.mendix.com/link/questions/86493

answered