If a user isn't configured on User setup, logoff from NAvisi
Saalek
Member Posts: 181
Hi
I have a problem:
If a user is created in Database, I must verify if this user is configured in a company. If a user isn't created in User setup table, I must logoff this user denying access to this company.
I tried to change Codeunit 1 -> OpenCompany function adding this code.
The errror message appears, but the company is opened.
Any suggestion ?? [-o< [-o<
Thanks
I have a problem:
If a user is created in Database, I must verify if this user is configured in a company. If a user isn't created in User setup table, I must logoff this user denying access to this company.
I tried to change Codeunit 1 -> OpenCompany function adding this code.
IF NOT TUser.GET(USERID) THEN
BEGIN
ERROR('User '+ USERID +' isn't configured');
LogInEnd;
END;
The errror message appears, but the company is opened.
Any suggestion ?? [-o< [-o<
Thanks
0
Comments
-
1: The function LogInEnd will not run, because error break all transactions and code. Use message for this.
2: but why you doesn't use the permissions for this? Here you can set the companys where the user has the rights to work with!
RegardsDo you make it right, it works too!0 -
1- I tried with message, but doesn't work.
2- Our customer wouldn't like to use roles
Thaks0 -
he would't like to use roles?
They are all super users?
An other solution is, send ALT+F4 to the application. Then the Navision application will be closed
RegardsDo you make it right, it works too!0 -
Saalek wrote:1- I tried with message, but doesn't work.
2- Our customer wouldn't like to use roles
Thaks
Unless your customer is very rich, and plans to spend a lot of money with you, you should advise them against this. If they decide not to use built in Navision security, and instead decide to have you do "Just This One Modification", then they will find that every week they will find they need "Just One More Modification" and the cost will mount, then they will want to upgrade, and need to revisit it all again.
Sit with your customer and show them the benefits of using built in functionality. If you don't then some time down the track they may be looking for a new partner.David Singleton0 -
I sit with my customer, I explain him Navision security system, roles, ...
but he said it is a bit complicated for him
Thank for your answers0 -
A bit complicated? OK, than all users are super.
But also by super users, you can select for wich company the role is.
so you have the Line
RoleID | Rolename | Companyname
regardsDo you make it right, it works too!0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
