Open company - filter?

We are offering NF 2.60 as a hosting solution, but wants to restrict the user’s “open company” window, to only show the companies that the user has access to (at least belong to a usergroup), and not all the companies in the database

In the User setup you can make a User a member of a single company or all. That is to say if you have 3 companies he can belong to one or all. If you want the User to belong to two or more of the companies you will have to create a table “User ID”, Company KEY “User ID”, Company both NotBlank UserCompanies.SETRANGE(“User ID”,USERID); // If find then Restricted User IF UserCompanies.FIND(’-’) THEN // Is the User a member of this Company SETRANGE(Company,Company); IF NOT UserCompanies.FIND(’-’) THEN ERROR(‘Sorry you do not have Logon Permission for %1’,Company) The reason for the SETRANGE and not GET is that you will not want to use this table for Admin etc: and it will stop you locking out all users if the table was deleted, empty or you create a New Company. Only put entries in the table for restricted Users This would be run from a Function in Codeunit 1 when the user has logged on. David Cox MindSource (UK) Limite Edited by - David Cox on 2001 Mar 07 08:24:32

Is there any way to restrict the user to see only one company from the list of companies on the same database? Edited by - em on 2001 Apr 04 10:44:15

David, For each user I can assign a role for each company. If no role is assigned the user has no permission. That’s in Navision as standard funcitonallity. Agreed? I really didn’t understand how the answer above would extend the existing functionality? When the user has logged in and presses “CTRL-O” I would like to only list the companies that I have assigned the user a Role. Suggestions?

No way. We spend a lot of time trying to find solution. When you use Open Company menu Navision opens system form that cannot be modified. Valentin Gvozdev BMI Inc.

Just one question… how do you offer Navision as a hosting solution, this is not permitted by the license conditions? Just curious… Lars Strøm Valsted Head of Project and Analysis Columbus IT Partner A/S www.columbusitpartner.com

I may not have understood the question. I am unfamiliar with the roles in 2.60 in the older versions you could belong to all or just one company. I think then that there is no option within Navision to interact with the list. One way could be to store a list within Navision, query the table from outside by c/front or SQL query load into a VB listbox let the user choose the company then open the Navision company with a command line string. disable the users from company open System Permissions, so they can’t see the other companies. I don’t know if this would work, not my area really, but worth a suggestion! David Cox MindSource (UK) Limited Navision Solutions Partner Email: david@mindsource.co.uk Web: www.mindsource.co.uk Edited by - David Cox on 2001 Apr 10 08:51:38

How about using Security? Security can be assigned by Company. Implement the Codeunit part of security and do not give users permission for Codeunit 1 in companies that they do not have access to. Bill Benefiel Manager of Information Systems Overhead Door Company billb@ohdindy.com (317) 842-7444 ext 117