Imagine the following, I have a list of rooms for rent, but it can only be accessed by registered users. When the user logs in it gets redirected to the main page (i.e. Home), how can I make the user get redirected to its requested link?
Hi Gabriel,
When you redirect the user to the Detail Screen if the end-user is not having required roles a Security exception is raised which sets the LastURL client variable value to the Default Screen.
For the mentioned requirement, one of the approach is to check the user role before navigating to the RoomDetail screen. If the role check fails then redirect the end-user to the Login screen after setting the LastURL.
Refer to the attached oml file (Code Changes: In Login screen action and Home Screen (RoomLinkOnClick Screen action))
I hope this helps you!
Kind regards,
Benjith Sam
Hi @Gabriel Freitas
Please check the steps
In Common UI Flows in side the Login Screen.
Login Client action as end point there is Re-Directing URL As per your requirement you can add the URL of the directing page.
I hope this helps.
If this is not your requirement, please share your OML so that we can help you.
- Palle Vijay Bhaskar Reddy
Sadly no, it doesn't solve the problem...
According to your scenario, In login action instead of giving HOME as a Destination, either you can provide your required destination or the URL which redirects you to go to the requested page
I hope this is your requirement. If not then please provide more details.
How can I do that? By passing the URL as a parameter to the login screen? Actually the login action is not going precisely to "home", it goes to the last page, I didn't changed the default action yet:
If(Client.LastURL = "", GetOwnerURLPath(), Client.LastURL)
There you go