Hi Divya,
you can check this document it’s so helpful: https://apidocs.rnd.mendix.com/8/client/mx.data.html
best regards,
Abdelrahman Abu Al-Ata
I'm afraid I've no complete answer for you, I struggle also with it.
The reason for the undefined message, is that the nanoflow should have been declared first.
You can however provide the nanoflow as a parameter to the JS-action.
Same applies for the context.
So you get something like this:
return new Promise(function (resolve, reject) {
mx.data.callNanoflow({
nanoflow: testNanoflow, // parameter JS-action
context: testEntity, // parameter JS-action
origin: page, // ??????
callback: function(result) {
alert("Nanoflow completed with result " + result);
},
error: function(error) {
alert(error.message);
}
});
Leaves the origin I guess, perhaps somebody else can provide some final answer here.
Hi Divya,
Call I microflow could be really easy. with the Nanoflow parameter (not sure what version it was introduced)
https://docs.mendix.com/refguide/javascript-actions#2-2-2-type
Before it was a bit harder, to get the nanoflow exported, it required a helper widget
https://appstore.home.mendix.com/link/app/111132/
Alternatively, you could also return the date from the the JS action and call a sub nanoflow (now supported) with the data of your custom action.
Cheers, Andries