When I have defined a Shortcut access in the V4.0 Shortcut menu to (for example) Excel or Word exe files, I get the error message “C/SIDE hyperlinking failed”. I get that mesage for any shortcut to any .exe file. I do not get that message for references to a .doc or .xls file (for example); those work fine. My initial reaction was the problem was related to security setup, but I have not been able to find anything that makes a difference. Any ideas?
In the ‘Changes.zip’ file in the v4.0 release, there is a document named ‘Navi 40 Late changes in functionality Oct 04.pdf’, which contains the following:
quote:
HYPERLINK(URL) The HYPERLINK function has been redesigned so that a number of protocols and file types are approved in the version of the program that you are using. This list of protocols and file types are listed in the .stx file. This means that different versions of Navision can approve different protocols and file types. To edit the list, open the .stx file, edit it and save it. The standard W1 version contains the following list of approved protocols and file types: Protocols – navision, http, https File Types – bmp, doc, htm, html, fig, gif, ini, jpg, mov, mpeg, mpg, pdf, ppt, rtf, sys, txt, url, wri, wpd, wps, xls, xml, zip The HYPERLINK function does not work on Navision Application Server. Example A customer might want to create a shortcut in the Navigation Pane that opens a specific program that he has installed on his computer (and not just a shortcut that opens a file, for example, a specific Word document). To create a shortcut to Microsoft Office Outlook®: 1. Ensure that Outlook is installed on the client computer. 2. Add the Outlook protocol to the fin.stx file by writing “outlook” in the protocol list. 3. Create a codeunit that contains the following code: SHELL (‘c:\Program Files\Microsoft Office\Office11\Outlook.exe’) 4. This statement opens Outlook. The path is only an example. 5. In the Navigation Pane Designer, create a menu item that runs this codeunit. 6. The menu item can then be copied to the customer’s Shortcuts menu.
Fritz, You certainly found the info I needed. Thank you. I had downloaded the 4.0 Release the day it was released and that document was not in the Changes.Zip I got then. I downloaded the latest Changes.Zip this afternoon. Now I’m trying to follow the instructions regarding adding a new file type (.exe) or protocol (for example, Excel and Word). My interpretation of the instructions you found for Hyperlink indicates I should be editing the fin.stx file. But it appears that the stx file cannot be changed (changing it creates a checksum error when it is opened by Navision). So, if I wanted to do exactly what the example in the instructions describes, how would I “Add the Outlook protocol to the fin.stx file by writing “outlook” in the protocol list”? I haven’t found a way to edit fin.stx. Secondly, it’s not at all clear to me how this string “outlook” gets linked with the defined codeunit so that the system will know how to interpret the string.
I have not played with the shortcut menu links per say, but how I read Fritz’s reply is: If you can’t edit the .STX file, you have to use a codeunit to create a link to an EXE (or other file not included in the .STX list). IF it were possible to edit the .STX file, rather than add “outlook” to the list, .EXE would make much more sense (because you are trying to open C:\Program Files\Microsoft Office\OFFICE11\Outlook.EXE.
Chris, I think I agree as to what actually has to be done, but what do you think item 2 means in the Navision documentation section that Fritz shared? “2. Add the Outlook protocol to the fin.stx file by writing “outlook” in the protocol list.” Sure reads to me like it’s telling me to change the fin.stx file.
Hmmm, (Careful – guess follows…) Is that what the (undocumented) ‘sealstx’ command line option is for??? From fin.stx:
quote:
// Commandline Options 02000-00001-080-2: id 02000-00002-080-2: temppath 02000-00003-080-2: testmode 02000-00004-080-2: showhelpid 02000-00005-080-2: sealstx 02000-00006-080-2: dbtest 02000-00007-080-2: debug 02000-00011-080-2: servername 02000-00012-080-2: database 02000-00013-080-2: dbreadonly 02000-00014-080-2: cache 02000-00015-080-2: commitcache 02000-00016-080-2: company 02000-00017-080-2: objectcache 02000-00018-080-2: nettype …
Wow, I will try to test that if I get the chance. If someone does test it, please post it!
‘sealstx’ is for internal use - mainly in Microsoft Navision country outlets and localization departments, where it is used for creating new fin.smt files. It can only be used if the license allows it. You cannot just change the .stx file as you have seen with the checksum error. I’ll investigate the information in this workaround.
A little experimenting shows that step 2 of the Example is not needed. In this light, it seems that the example provides a workaround – HYPERLINK won’t work, so use SHELL inside a codeunit instead. The following observations may be of interest:
- You can probably use SHELL(‘Outlook.exe’); in the codeunit – the entire path is (usually) not required
- The workaround costs 1 codeunit and a ‘Company’ level MenuSuite modification (Users cannot add a ‘direct’ shortcut to a Navision object – the menu item must exist in some menu before it can be added to their Shortcuts
- Users will get a ‘security warning’ dialog (as described in the SHELL topic in the ‘Late Changes…’ doc) the first time they run the menu item/shortcut. If the user chooses to allow the exe to run, this choice is stored in the zup file, and the warning not shown on subsequent runs.
Just to complicate the discussion a little further: I have been corresponding with another local Navisioneer. He tells me that on his Navision 4.0 installation he has no problem inserting a direct link to the Excel exe (C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE) in a shortcut in the Open Property. In other words, what won’t work for me works just fine for him. The mystery deepens.
And doesn’t the SHELL command open a Command Prompt anymore?
Dave – (Dumb question, I know, but I have to ask…) Your local correspondent is running the latest build, right? Or perhaps he is still running a Beta build that hasn’t been subject to the ‘Latest changes…’??? Nelson – I did not see a command prompt window – actually I never have. Perhaps I’m not looking in the right place?
OK, so I tried with Notepad and it’s opening it immediately. Maybe I’m a little confused, sorry.
I’ve looked more into this workaround information. There are actually two unrelatred workarounds here. 1. Adding the outlook protocol to the .stx file, which allows for running Oulook and is not a general solution for executables. This allows the user to directly create a hyperlink in his Shortcuts menu of the form ‘outlook:\inbox’ or ‘outlook:\calendar’ etc (the syntax mentioned in the text is wrong). As I said, the stx file can only be sealed with the appropriate license, so this is not a practical customer workaround. 2. Go the Codeunit route and use SHELL to run whatever you like directly. This is also not practical for the reasons stated in one of the posts. There should be a better solution available in the future.