Creating a URL for page having a non-persistable entity as dataview.

0
The problem statement is:  I want page to be redirected to the same page instead of redirecting to homepage after it is refreshed. How can I do this?   Problem: The page is having non-persistable entity as dataview , that's why I can't pass the url.   Tried: Made a javascript action with function (mx.reloadwithState(url))  but this works only for persistable entity.
asked
3 answers
1

Hi mihika,

 

      

  1. Create a microflow (e.g. MF_RefreshCurrentPage).

  2. Inside the microflow:

    • Recreate or retrieve the NPE again (the same as your original logic).

    • Use Show Page activity → open the same page again, passing the recreated NPE object.

  3. Trigger this microflow (e.g. from a button, after save, etc.)

This effectively reloads the same page, but from Mendix context — not browser-level reload.

answered
1

Hi Mihika,

I am assuming you are submitting the form and closing all the pages that's why you are redirecting to home. Just close 1 2 pages according to your need.

 

And if you want to set the url just download the setURL widget from mendix marketplace and set the url accordingly.

set URL widget

answered
1

Hi, 

Try wrapping your logic inside a microflow that recreates the object dynamically each time the page opens. This lets the user stay on the same page after refresh and feel no interrupt, even though the object itself was rebuilt.

answered