Prompt for Open Company

Hi all, Implementing a multiple company database I am faced with the problem that specific users are only allowed access to specified companies. I manage that by means of roles, but the problem is that Navision insist on opening the last company opened when the program starts. What I would like to do is that if the user has access to more than one company force the Open Company window to appear because it can cause problems if the user doesn’t pay attention to the title bar and performs actions in the wrong company. I’ve tried entering the key sequence ‘^A’ from Codeunit 1 but nothing happens (using Windows Script Host in Automation). I obviously cannot delete the zup file everytime the user logs off but I can’t think of anything else so all suggestions are welcome. Have a nice weekend… Eyrún

Even if you forced the Open Company window, you can’t force the user to pay attention to what choice they are selecting. The best solution I’ve seen to this is to assign different logos to each company and to display the logo of the currently open company prominently on each of the menu screens (Main menu, Sales & Receivables menu, Inventory menu, etc.). I might add that each of the assigned logos was a bright color and the shape and color of each logo was quite a bit different from the others. The users could still not pay attention, but they lost their opportunity to say with any validity “I didn’t notice”.

Thanks Daves, I still haven’t seen the different logos of the group but from what I’ve heard they all look pretty much alike. It’s a good idea though and I will certainly try it but I’d also like to force the open company window somehow if someone can give me a hint as to how to do it. Kind regards, Eyrún

Hi! Maybe you could create different “Shortcuts” on the Desktops and use the parameter “company” and different ZUPs there, e.g.Shortcut MyCompany1 ...\fin.exe servername=navision,nettype=tcp,company=MyCompany1,id=1.ZUP Shortcut MyCompany2 ...\fin.exe servername=navision,nettype=tcp,company=MyCompany2,id=2.ZUP Shortcut MyCompany3 ...\fin.exe servername=navision,nettype=tcp,company=MyCompany3,id=3.ZUP Regards, Jörg

Vielen Dank Jörg, It’s also a good idea but have you tried it out ? My doubt is if you would connect to Company 2 using 2.zup - if you then change companies without closing the client won’t that modify the zup ??? Tschüss, Eyrún

Hello Eyrún!

quote:


if you then change companies without closing the client won’t that modify the zup


The ZUP should be updated when the Client is closed. But whatever “Company” is saved to the ZUP (e.g. Company2 in ZUP1), the parameter “company=MyCompany1” should overrule this, so if you click on Shortcut1 next time, Company1 should be opened … (have not tried it, yet) Best Regards, Jörg

Hello Eyrún! If you use the company parameter but don’t select a companyname, the user will be forced to choose an exising company (eg. company=, id=Myzup) If you use the company parameter with a name that doesn’t exist is the database, the user will get an error and be forced to choose an existing company.

Hej Magnus, I’ll try this one… Tack så mycket, Eyrún

Hy Eyrun sorry im Late but try this: “VOLUME:\PATH\fin.exe” Servername=“YOURSERVER”,Database=“YOURDATABASE”,id=“ZUPFILE”,…any other parameters DONT specify Company=“YOURCOMPANY” so navision dont open a company. After authentification the navision client is connected to the database. To start the “main-menue” you have to push F12 or click on then navision button (blue square on top,right position). In fact there is no company selected, navision starts the form to select the companys automatic before the main menue appears. Bye (Stefan);