How to use return value from a Microflow inside a javascript action

0
Hi,   I have a javascript action where i’m able to execute a Microflow. This Microflow is returning a List. Is it to use that return value of the Microflow in the avascript action, and if yes how?
asked
1 answers
2

Hi Nico,

 

I assume you are using mx.data.action to call a microflow from JavaScript.

If so, the parameter in the callback function is of type array when the microflow returns a list of objects:

 

mx.data.action({
    params: {
        actionname: "MyFirstModule.GetMyCats"
    },
    origin: this.mxform,
    callback: function(list) {
        // variable 'list' is of type array here
    },
    error: function(error) {
        alert(error.message);
    }
});

 

Hope this helps!

answered