Close page and show new page through mx.data.action() microflow call

1
I have the following piece of JavaScript in a custom widget:   console.log('My origin is: ' +this.originPage.path); console.log('My origin is: ' +this.originPage); mx.data.action({ params: { actionname: this.mfOK, applyto: 'selection', guids: [this._contextObj.getGuid()], origin: this.originPage }, callback: function() { if(this.closeForm){ mx.ui.back(); } }.bind(this), error: function(e) { logger.error('Error executing microflow: ', e); } }); The output to the console of the originPage shows what I would expect: originPage.path shows SomeModule.SomePage.page.xml and originPage is [object Object]. In the this.mfOK microflow I close a page and I open a new page. The microflow executes succesfully (status 200). Furthermore, this.closeForm is false, so mx.ui.back() does not get called. However, the above call leads to an the following error in mxui.js: "An error occurred while handling queued requests: Cannot read property 'close' of undefined". How do I call a microflow from a widget which closes the current page and shows a new page?
asked
0 answers