License usage by company

orossi
Member Posts: 12
Hi.
I have Navision running on SQL Server, and I have a 53 user license. I have 3 companies in 3 separate databases. Each company has its own users, and some common users.
Is there any way to define a maximum number of logins by companies, like in navision db when defining the service with the parameter 'Sessions'?
I would appreciate a lot any help about this issue.
Thanks and Happy New Year!!
I have Navision running on SQL Server, and I have a 53 user license. I have 3 companies in 3 separate databases. Each company has its own users, and some common users.
Is there any way to define a maximum number of logins by companies, like in navision db when defining the service with the parameter 'Sessions'?
I would appreciate a lot any help about this issue.
Thanks and Happy New Year!!
Osvaldo Rossi
0
Comments
-
you would need to make a modification. Create a new table company independent, as users login in for a company insert a record into the table with user ID company name. When they log out delete record. Also if any user that doesn't exists in session table should be deleted as well, just in case some user killed the client. Also as you insert the record check and see how many records allready are in that company, if it reaches your limit error out.0
-
ara3n - problem is that the companies are in separate databases...0
-
In codeunit 1, function "CompanyOpen()", you know in which company (and in which DB you are), so filter on the "Session"-table the users in this DB. You can put a new field in the "Company Information"-table to indicate the maximum no. of users in the company (for you, this is max no. of users in the DB). If you exceed the no, give an ERROR.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
oh didn't read that part. In that case each database is separate company, the session table shows which database you are logged in, and follow kriki advise.0
-
Do you have three licenses?0
-
Thanks a lot for all your help. I was just thinking in modifying CU 1 and use the session table. I'll keep U informed as I progress.
I've modified the Sessions view in the SQL DB to filter only the sessions belonging to this database and it works fine.
RegardsOsvaldo Rossi0 -
Thanks to the wise advice of all of you, I finally came up with the solution. Here you have what I've done:
1. Add a field in the Company Informtaion table. Name i.e. "No. of max users" integer.
2. In this field you enter the maximum amount of connections allowed.
3. Modify CU 1 with the following code:
Variables
companyInfo Record "Company Information"
sesion Redord "Session"
usersmax Integer
users Integer
Here is the code...
CLEAR(companyinfo);
companyinfo.GET;
usersmax := companyinfo."No. of max users";
users := 0;
CLEAR(sesion);
users := sesion.COUNT;
//No of users validations
//Never forget to leave a 'security device'
//(Note te USERID overriding. Just in case of emergency)
IF ((users > usersmax) AND (USERID <> 'orossi')) THEN
ERROR (STRSUBSTNO('You've reached the maximum no. of connections allowed.\\'+
'You are user no. : %2\'+
'Max. no. of users: %1\'+
'Your User ID : %3',usersmax, users, USERID));
Suggestions, improvements are welcomed.Osvaldo Rossi0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions