Employee card with UserId

njaiku
Member Posts: 116
Hi,
In the Employee table i have created the field UserID and linked with UserSetup table. In Employee form i included the field Userid where for each employee one userid is assigned. If userid is not mapped in the employee card then it should not allow me to enter into the database.
This needs to work for both in Windows login as well as in Database Login.
Looking forward for your valuable suggestions.
In the Employee table i have created the field UserID and linked with UserSetup table. In Employee form i included the field Userid where for each employee one userid is assigned. If userid is not mapped in the employee card then it should not allow me to enter into the database.
This needs to work for both in Windows login as well as in Database Login.
Looking forward for your valuable suggestions.
Jai
0
Comments
-
Build the check in codeunit 1, trigger LogInStart. Just throw an error if the requirements are not met and you will not be able to log in to the database.0
-
Hi,
Thanks for your valuable suggestion. I placed the coding in LoginStart. The code is as follows:recemployee.RESET; recemployee.SETRANGE(Status,recemployee.Status::Active); recemployee.SETRANGE("Termination Date",0D); recemployee.SETRANGE("Users IDD",USERID); IF NOT recemployee.FINDFIRST THEN ERROR('Employee does not exist');
Placing this code in Loginstart doesn't work. It shows the error message but it allows me to enter into the company even the employee doesn't exist. Where should i have to place this coding??????
Looking forward for your valuale suggestions.Jai0 -
Hi,
Can anyone help me out to find the solution?????Jai0 -
close the application if you cannot find the employee ( try sendkey's and ALT + F4, there is enough to find on the forum about the sendkeys)0
-
Maybe calling CompanyClose after you throw the error does the trick?0
-
Hi,
Even if i place the function company close after the code . It's not working.... Is there any solution its very urgent can anyone help me out?????Jai0 -
If you use LoginEnd then your login should stop. Try calling that afterward.0
-
Hi,
If you are on SQL, you can use the stored procedure "sp_$ndo$loginproc" to do this check for you.
If you raise an application error when the user does not meet certain requirements, the user will not be allowed to login.
We've written an application that locks out all "regular" users except accounting during year end.
We also use it for locking out users while performing maintenance.
Regards,
WillyFostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.0
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