can I commit an object from JS Action or call a nanoflow from JS Action.

1
can I commit an object from JS Action or call a nanoflow from JS Action.
asked
1 answers
1

You can call a Nanoflow or commit an object using the JavaScript Client API.
https://apidocs.rnd.mendix.com/9/client/mx.data.html

mx.data.callNanoflow({
    nanoflow: this.propertyWithNanoflow,
    origin: this.mxform,
    context: this.mxcontext,
    callback: function(result) {
        alert("Nanoflow completed with result " + result);
    },
    error: function(error) {
        alert(error.message);
    }
});
mx.data.commit({
    mxobj: obj,
    callback: function() {
        console.log("Object committed");
    },
    error: function(e) {
        console.error("Could not commit object:", e);
    }
});

 

answered