URL's generated by ServiceNow do not work in MS Office applications.

mvliege
Kilo Explorer

Has anyone tried to use the URL's generated by the copy URL functionality from an MS Office application? At my site, the URL redirects the user to his homepage, and not to the specific item. For instance, I have a link like
https://demo.service-now.com/nav_to.do?uri=change_request.do?sys_id=f3a9e576701a5c00c8e00e2c809b2e04...
to go to a specific change request. When I paste this in the browser it works, and from an email message it works, but not for a word document, excel document or a powerpoint presentation.

We use MS Office 2007. Please let me know your results....

Regards,

Maurice Vliege.

20 REPLIES 20

ajnau
Kilo Explorer

Hi Eican,



Has there been a resolution to this MS Office and ServiceNow URL problem?



Regards, AjNau


Hi Eican,



We are experiencing the same issue.   Can you please post an update when you receive one?



Thanks,
Keith


rob_blakey
Tera Expert

Hi Maurice,



I noticed that this isn't just specific to ServiceNow, but more the way MS Office products handle https:// hyperlinks within their products.



I did however find two very useful KB's that don't specifically mention this issue however, it may be helpful for you:



https://support.microsoft.com/en-us/kb/218153


https://support.microsoft.com/en-us/kb/218153



https://support.microsoft.com/en-us/kb/899927


For MS Office 2010 the following registry key / value adjusts the way Office opens URLs.   I haven't tested on other versions of MS Office.



[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\9.0\Common\Internet]


"ForceShellExecute"=dword:00000001



In fact my MS Office 2010 installation didn't even have a 9.0 key or sub-keys, but after creating the above key / value it worked.



An interesting TechNet blog on the topic of "ForceShellExecute"...



http://blogs.technet.com/b/emeaoffice/archive/2013/06/13/impact-of-using-forceshellexecute-1-in-offi...



Regards, AjNau


benlittle
Tera Expert

The problem is URI Encoding when using the service catalog. Part of the URL has to be encoded for the link to work from external sources, not just Word.


Here is what I used to make it work, you can code this using the built in encodeURIComponent javascript function if you want



Assume this is your starting URL:


https://<instance_name>/com.glideapp.servicecatalog_cat_item_view.do?v=1&sysparm_id=d5b373570f0d0f00...



Word doesn't like the =, &, ? etc.



You can use encodeURIComponent() javascript function, but that also hits the https:// part of the URL



What you need is to encode everything from com.glideapp.servicecatalog onward. You can do that with the encodeURIComponent, but to see it real time, go to:


http://pressbin.com/tools/urlencode_urldecode/



and type in your URL in the top window. You want the encodeURIComponent result. It will look like this:



com.glideapp.servicecatalog_cat_item_view.do%3Fv%3D1%26sysparm_id%3Dd5b373570f0d0f004b27348ce1050e1d%26sysparm_link_parent%3D21f5fd06d8090500dac46095d5e4a117%26sysparm_catalog%3De0d08b13c3330100c8b837659bba8fb4%26sysparm_catalog_view%3Dcatalog_default


Now, just put the following at the front of your link:


https://<instance_name>/nav_to.do?uri=



You should end up with the following:



https://<instance_name>/nav_to.do?uri=com.glideapp.servicecatalog_cat_item_view.do%3Fv%3D1%26sysparm...



And that will work from Word, emails, etc., with an added bonus of staying within the Service-now frame if they are already logged in.