Open a specific page in mendix application on click of link sent over mail
0
Hi Team, We have small workflow within mendix application where a particular task keeps going back and forth : For ex. Assume A have one task, he will assign it to one user B, B user will then act on it and complete the task, he will then submit back to the A. So A will get email which will have a link, that link opens a overview page of that task. When I am clicking on a link(from email), it was taking to wrong login page. so we have written some javascript code and along with coockies we are taking it to proper login page. But once logged in, its taking to default page of that particular role, not the one which was there in the email. Below is the javascript which we are using in javascript snippet on layout page: if (document.cookie || document.cookie.match(/(^|;)redirectpagelink=/gi)) { var url = ''; var cname = 'redirectpagelink'; var cookieArr = document.cookie.split(";"); if (cookieArr.length>0) { for(var i = 0; i < cookieArr.length; i++) { var cookiePair = cookieArr[i].split("="); if(cname == cookiePair[0].trim()) { url = decodeURIComponent(cookiePair[1]); } } } document.cookie = "redirectpagelink=; path=/; max-age=0"; alert(url); if(url.includes('login.html?messageCode=403#')) { url = url.replace('login.html?messageCode=403#','p'); alert("Message Code replaced"); } else if(url.includes('login.html')) { url = url.replace('login.html#','p'); alert("Login HTML replaced"); alert(url); } window.open (url, '_self'); } using above javascript, we are capturing the link and trying to edit the url and forcing browser to go there, but its not working. So I have question, how can I navigate to below link on login : http://localhost:8080/p/task/download-configuration/31806672368308029 I simply want is : When user clicks on this link, user should be asked to login to custom login page. User should enter his/her credentials. User should be able to see that particular tasks overview(as mentioned above rather than going to http://localhost:8080 only). Thank you.
asked
Pradip Pokale
3 answers
0
As Kshitij mentioned, have a look at the deeplink module in the appstore.
What happens if the user is already logged in. So before she is opening her mail and clicks on the link. That way the deeplink routine won’t be interrupted by the login routine.
Are you in the opportunity to set up SSO?
answered
Tim v Steenbergen
0
Just a few thoughts
do you run the after startup mf of the deeplink module?