mx.ui.openForm('MyFirstModule/Page1.page.xml', {
location: "popup",
callback: function(form) {
console.log(form.id);
}
)
https://apidocs.rnd.mendix.com/8/client/mx.ui.html
You can also add a URL attribute to the page (for example ‘mypage1’) and use
localhost:8080/p/mypage1
in Andrej’s javascript (you have the leave the localhost out but this is easier to read and test)
This is easier to maintain.
I did do this.
I used a link that included parameters of the id of a certain entity that I needed.
example /?RequestId=31&Page=Request
I then used js to parse the parameters. from window.location.href;
I then cleared the location (if you dont, the nanoflow you use on the homepage will just keep getting triggered)
After I did this, I dynamically passed the page name and the request needed using what andrew pointed out.
mx.ui.openForm('MyFirstModule/Page1.page.xml', {
location: "popup",
callback: function(form) {
console.log(form.id);
}
)
That should be about it.