How can i get rid of id in url and use another thing?

0
So in my page i have question and answer and for each question and answer there is an id, i will call it reference, so what i want to is to NOT use Mendix’s id  but use my question reference! is there a solution ? as you can see refreshing the page redirect you to the home screen: https://drive.google.com/file/d/1Kl8T7wvXItmuSyUY3o3Xm0Sf4JTwVHjm/view?usp=sharing
asked
2 answers
2

Hi Ibrahim,

You can not do this, and , this is not considered a good practice in the case of any data related work, bcz each data should have a primary key, if you want to use something else, other than the primary key, it will work but sometimes it will fetch unwanted data also.

 

If you still wanna do this, just let me know

 

hope it helps!

 

new images..

answered
1

To do this you’d need to use the Deeplink module to handle the incoming custom URL.

https://marketplace.mendix.com/link/component/43

You add your custom ID as a parameter in the URL and this can be passed into the microflow for you to use. Once in your microflow you can use this to built the URL you need to call your REST service. 

You will also need to look at using the SetURL module from the Marketplace to change the URL on the page the user sees to your custom URL. You may need to urlEncode the value of the ID when building the URL to make sure it is safe for the browser.

https://marketplace.mendix.com/link/component/65083
https://docs.mendix.com/refguide/string-function-calls/#urlEncode

Hope this helps.

answered