close form after microflow call from Widget Mendix 5

1
Hi, After calling a mf from my custom widget, the close-form action in the mf is not working. In the forum i've found the solution for non-mx5 version, to add a close function and the _Scriptable mixin. I am now able to call the close function, but how do I exactly close the form? The 'this.disposeContent();' is not a function according to the debugger.. What am I missing?
asked
2 answers
4

You should pass the calling form(in your scope) to the 'store' parameter when calling mx.data.action. This calling form is needed by the client to determine in which page the widget resides.

Try something like this:

mx.ui.action({
                        store: {
                            caller: this.mxform
                        },
                        params: {
                            applyto: "selection",
                            actionname: this.onchangeAction,
                            guids: [this._contextObj.getGuid()]
                        },
                        error: function (error) {
                            console.log(error.description);
                        }
                    });
answered
2

Hi Rogier,

You can use

this.mxform.dispose();
answered