redirect / landing page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2016 08:52 AM
has anyone created a page - say ticket_redirect.do that takes a simple parameter or two and based on the user's roles or lack of, directs
so ticket_redirect.do?type=incident&id=98a3b6cf6f0582c0af665c0d5d3ee431
We have a redirect script that is used when our users logon and ensures that the user is directed to the relevant portal (if non process), but we have an issue in that a number of our sites have sitemame/xxxxx_details.do so that a non process user see's their tickets in the portal style. (xxxx is either incident, request or order)
The notifications typically send out the standard nav_to.do so a non process user follows the link and will then briefly see the ticket in the process view before being directed to the portal (and not to the ticket as it is not coded in)
I can modify the redirect to do this, but it is non elegant as they still go to the process view before being redirected. What I want to do is create a page like ticket_redirect.do pass a couple of parameters and have that page determine
process user = yes, goto nav_to.do with the relevant codes
non process user = yes, go to their site / portal calling the relevant incident_details.do page
as I feel it would look seamless.
I have a couple of idea's, but thought I'd see if anoyne else has done anything similar first
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2016 12:38 PM
When I read through your post, it sounds like the biggest problem is that the links that go out in the email point to nav_to.do and that is ultimately the cause of your problems?
If so, my comment is simple. Run a mail script to alter the link to the appropriate one. We ended up doing that for the Survey/Assessment piece because we customized the page. Here is a snippet of the code:
I might be understanding your problem incorrectly, but if the problem is the link in the emails then you could just fix that and all your problems are solved. Rather than allowing a link that does not work great and attempting to work around it. Just a thought!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2016 01:25 AM
Hi Trevor, the issue is more the clients requirements
As we have a few sites and their branding is different, when we send a notification they only want a single URL and that should always work and take that user - regardless of role - to the right link - process or the right site and link.
I have looked at the Evergreen templates and reworked a lot of that. It will look at each notification, break it down to each user and then update the URL link and any date / times into the correct link for that user and their date / time zone.
Only issue is that it sends out a lot of notifications and we are aware that O365 has some limitations as we have encounterd these with our standard notifications, let alone if we increase x folder.
Some of this update may get pulled back, and the only way I can then think of providing a single link is to create a page, pass the parameters and let it determine where to go next. Still may not be as seamless as I would like, but a lot better than what happens now.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2017 09:24 AM
If I understand what you are trying to do, then we had the exact same requirement.
We wanted to keep end users within ESS, which means if they click a link to their incident (or whatever other record we have sent them) then it should open up with the user friendly ESS frames etc etc.
For Example, have emailed approval request hyperlinks to open the respective approval request within ESS.
Here is what you have to do:
1. Create a CMS page "Portal — Approval Detail" (sysapproval_approver_detail.do) to handle requests to view approval records.
That page contains a content block of type "Show the page's current document".
2. Create a content type "sysapproval_approver" to handle the display of the approval record.
As part of this page, include mobile detection to redirect mobile users to the mobile UI for that record. Otherwise mobile users will see the desktop ESS, which is annoying. Also bear in mind the sysparm_stack so that if the user hits the back button once they get to the record, they will go to the appropriate list with the expected filter already in place.
Here is the content type details:
<?xml version="1.0" encoding="utf-8"?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate>
var gr = new GlideRecord('content_block_iframe');
gr.initialize();
gr.frame_name = 'gsft_main';
var recordURL = "sysapproval_approver.do?sys_id=${current.sys_id}${AMP}sysparm_view=ess${AMP}sysparm_stack=sysapproval_approver_list.do%3Fsysparm_query%3Dapprover%3Djavascript%3AgetMyApprovals()%26sysparm_view=ess";
gr.url = recordURL;
gr.sizing = 'expand';
gr.putCurrent();
</g:evaluate>
<g:render_content_block_iframe />
<g:evaluate>
gr.popCurrent();
</g:evaluate>
<script>
if(isMobile()){
window.location.replace("$m.do#/form/sysapproval_approver/${current.sys_id}"); //Helsinki Mobile UI
//window.location.replace("nav_to.do?uri=${recordURL}"); // Fuji Mobile UI
}
function isMobile() {
var check = false;
(function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera);
return check;
}
</script>
</j:jelly>
3. Your hyperlinks then need to look like this:
<a href="${mail_script:baseURL}ess/sysapproval_approver_detail.do?sysparm_document_key=sysapproval_approver, ${sys_id}">Click here to view the approval request</a><BR>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2017 09:28 AM