Page URL & Non-Persistable Entities

0
Hello Mx Community!   I referred to Mendix Documentation about Page URLs and I found that you cannot use them with non-persistable entities. I use Mendix v10.1.1.   Is there anyone that has implemented a walkthrough to bypass this limitation?   I really want to use non-persistable entities as parameters in page URLs but I don't know if this is possible after all.   Thanks in advance!   KR, George
asked
1 answers
1

Reason for not be able to have a non-persistable in a page URL is because of the concept of page url's

 

A page url allows someone from OUTSIDE the application to access the application at a specific page.

If the page starts with a listview or datagrid, then the page URL is static. {appURL}/p/pagename and this URL is static in all situations.

if the page starts with a dataview, then the url is dynamic {appURL}/p/{ObjectID}. Where the ObjectID value is defined by the desired object you need to view. For example, you want to show the details of a specific Order, then the page starts with a dataview with context Order, and ObjectID of the page URL is the ObjectID of the desired Order. When accessing the page using the Page URL, the ObjectID is used to fetch the corresponding Order record from the database. This is the reason why Non-persistent entities cannot be used; the do not exist in the database, they are temporary (not persistable) thus you are unable to fetch the corresponding record from the database, since it doesn't exist.

 

If you want to open a page, where someone can enter NEW data, then create a microflow, which creates a NEW object of the non-persistable entity and pass the new object to the page. Use a deeplink (Mx 9) or a microflow URL (Mx 10) to trigger the microflow from outside of the application instead.

 

Hope this answers the question why it cannot be done, and how to solve it.

 

 

answered