Using URI+ to force a view when following link in email

Uncle Rob
Kilo Patron

According to Scripting for Email Notifications if you put ${URI+&sysparm_view=ess} you can force the ess view of the form to the record the user clicks.

I definitely have an ess view for the form the record uses, but that link keeps going to default view.


Is this a valid feature in Eureka?

10 REPLIES 10

thanks for the suggestion Kalai, I should have mentioned that I'd already tried that but it didn't work.


Oopsy...



Thought it did when Robert marked it correct. Let's wait for his response !!


Yeah, so I didn't get it to work... reliably.   The paradox is it would *ONLY* work for an admin who had "remember me" checked on login.
Unlicensed users would get past login and go straight to the default form view.   If they were already logged in, it would just pop open a new browser window and go straight to default view.   After dozens of permutations of clearing cache and preferences and setting different default browsers, I just gave up.  




I ended up using the global business rule view forcing trick.   Hate having to rely on that, but there's simply no other way I know of to reliably enforce views.



If only they allowed View Rules to be scriptable.


Thanks, even though it didn't work it's reassuring to hear we both came to the same conclusion and workaround.


Hi Graham,



Create a new email notification script and use the below 2 lines in that. What I am doing here is setting the General view for the incident, when the user clicks the link in the email he receives.



var url = gs.getProperty("glide.servlet.uri") + 'nav_to.do?uri=incident.do?sys_id='+current.sys_id+'%26sysparm_view=general'; //Here the General view is used


template.print('<a href="' + url + '">' + current.number.getDisplayValue() + '</a>');



Give the script a name and then go to the notification and include ${mail_script:name of the notification script} in the place where you want to use.



This will definitely work as I use this in my instance. let me know for any issues.