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!!
Osvaldo Rossi
0
Comments
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I've modified the Sessions view in the SQL DB to filter only the sessions belonging to this database and it works fine.
Regards
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.