Microflow call using java script code

0
Hi, i am trying to call a MF in java script code, but getting below error. How to resolve this?
asked
2 answers
1

Hey Sonam,

 

Microflows can be called in a JS Action via the Client API (without any workarounds):

mx.data.action({
    params: {
        actionname: "MyFirstModule.PetCat"
    },
    origin: this.mxform,
    callback: function(obj) {
        // no MxObject expected
        alert("Just petted the cat a little");
    },
    error: function(error) {
        alert(error.message);
    },
    onValidation: function(validations) {
        alert("There were " + validation.length + " validation errors");
    }
});

 

 

Everything you could possibly want to do with the javascript client is documented in the client api docs.

 

https://apidocs.mendix.com/7/client/mx.data.html#.action

This one can show you how to call a microflow.

 

Also take a look at the widget boilerplate on Github:

https://github.com/mendix/AppStoreWidgetBoilerplate

 

Most of the time someone in the community has already built a lot of the functionality your looking for. So take a look on the appstore there might be a widget that

does 90% -100% what you want. The beauty of the widgets is they are all open sourced and easily customisable.

 

 

Hope it helps !

 

answered
0

Hi Sonam!
                Have a look at this document : https://apidocs.rnd.mendix.com/9/client/mx.data.html

answered