How to Call a Nanoflow via JavaScript Snippet and Authenticate a User via Microflow?

0
Hi everyone, I have two questions regarding Mendix functionality: Calling a Nanoflow from JavaScript:Is it possible to call a nanoflow using a JavaScript snippet or any custom script code within Mendix?If yes, could someone provide a simple example or point me to the right way to trigger a nanoflow from JavaScript? User Authentication Using Microflow:What is the correct approach to authenticate a user via a microflow?For instance, if I have a custom login form, how can I validate the credentials and log in the user using a microflow? Any help or reference to documentation would be greatly appreciated! Thanks in advance!
asked
1 answers
0

Hello Sai,

You can refer the below code for calling a nanoflow/microflow from a Javascript snippet using jQuery:

$('.classname').click(function () {

    mx.data.action({       

           params: { 

                             applyto: "selection", 

                             actionname: "ModuleName.ACT_Slot_View", 

                             guids: [$(this).attr('id')] 

                           }, 

      origin: this.mxform,  

      error: function (error) {   

       alert(error.message);     

   }   

 });

});

 

Best Regards

Amit Gupta

 

 

answered