Setup Window Login as Warehouse's Employee.
mel711
Member Posts: 15
My company is using Windows Authentication to login Navision 4.0. Our windows login uses Group and Individual accounts.
I have a problem to setup Warehouse employees (Form 7328). When I lookup 'User Id' field, an "overflow" error is displayed because I have a Window's Group Id which exceeds the Navision's standard field length (Code 20). Now, I can modify the codeunit 418 "Login Management" 's LookupUserId(UserID) funtion to exclude all shortIDs which has length >20 or some other criteria.
1) The question is, if i modify this codeunit, will it affect anywhere else in the program? #-o
2) Or is there a better solution to this? :roll:
Thanks.
I have a problem to setup Warehouse employees (Form 7328). When I lookup 'User Id' field, an "overflow" error is displayed because I have a Window's Group Id which exceeds the Navision's standard field length (Code 20). Now, I can modify the codeunit 418 "Login Management" 's LookupUserId(UserID) funtion to exclude all shortIDs which has length >20 or some other criteria.
1) The question is, if i modify this codeunit, will it affect anywhere else in the program? #-o
2) Or is there a better solution to this? :roll:
Thanks.
0
Comments
-
Hi,
The LookupUserID routine is called all over the application in the OnLookup Trigger of the filed "User ID" in various tables:
I guess that filtering users with ID greater of 20 chars would only hide that users from that lookup form.
So, I guess sommething like:LookupUserID(VAR UserID : Code[20]) : Boolean IF WindowsLogin.FIND('-') THEN REPEAT s := ShortUserID(WindowsLogin.ID);//code added IF STRLEN(s)<=20 THEN BEGIN//code added TempLogin.INIT; WindowsLogin.CALCFIELDS(ID,Name); TempLogin."User ID" := s;//s variable added instead of ShortUserID(WindowsLogin.ID); TempLogin."Windows Login" := TRUE; TempLogin."Windows Login ID" := WindowsLogin.ID; TempLogin.Name := WindowsLogin.Name; TempLogin.INSERT; END;//code added UNTIL WindowsLogin.NEXT = 0; ...(where the s could be a text[1024] variable)
whould work...
(The code came from Nav 3.70.A.)0 -
Yah, i was going to do something like that. But my concern is whether is there any other place or module that will be affected? Eg: whether 'change log' or any registers will use this LookupUserID routine.
Logically thinking, the system will store Individual Id (my individual id is only 6 characters long) instead of Group Id (which is used to ease role assignments, might have more than 20 characters) in tables where changing this routine seems harmless.0 -
Hi,
I have checked the "where used" of the LookUpUserID function with the Developer's Toolkit and it is used only on the OnLookup routines of various tables.
The change log gets the name of the user with the USERID function that returns only the name of the user not the full path.
So I think that it is ok for you to make the change, or to be more accurate, ask your developer to make a "where used" on Navision 4.0 objects with the Developer's toolkit cause I haven't imported the Nav 4.0 Objects into Developer's Toolkit yet.0 -
Hi Arhontis,
Thanks for your answer and quick reply. Making the changes seems harmless since its only for lookups. So, I will take your advice
However, in your given code, should move this line up because WindowsLogin.ID is a FlowField:
- WindowsLogin.CALCFIELDS(ID,Name);REPEAT WindowsLogin.CALCFIELDS(ID,Name); s := ShortUserID(WindowsLogin.ID); .....
Thanks !
0 -
#-o
You are right... You should move the CALCFIELDS up.
Sorry for the little mistake...
I have also checked the Navision 4.0 Objects (imported them into the Developer's toolkit) and that function is only used in lookups...0 -
Thanks a lot there! U are a great help \:D/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
- 322 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
