How to track User Id from Employee Portal

b2b_Vijay
Member Posts: 76
Hi,
When ever i insert a record from Employee Portal Web part, the user id inserted into Navision Table is Nep_User instead of the actual Userid.
When i do the same from Navision, it is recorded with the correct userid and not NEP_User.
Can some one help me how i should correct this issue or is there any work around for this.
When ever i insert a record from Employee Portal Web part, the user id inserted into Navision Table is Nep_User instead of the actual Userid.
When i do the same from Navision, it is recorded with the correct userid and not NEP_User.
Can some one help me how i should correct this issue or is there any work around for this.
Regards,
Vijay
Vijay
0
Comments
-
Hi,
in general in NAV the global variable USERID is used to store the user information.
Because of the fact that the code is run by the NAS, the user with whom the NAS is running, is in this global var.
There is an adjustment in codeunit 423 - Change Log Management, where the user id for change log entries is set differently if it is running from NEP.
To have this also in your code you have to replace your code this way://Old Code FieldValue := USERID; //New code IF GUIALLOWED THEN FieldValue := USERID ELSE FieldValue := Codunit423.GetUserID;
Then add to codeunit 423 a new function which will return the LogEmployeePortalUser.
HTH,
Rainer0 -
This is very simple.One local variable is there in all EP Code unit .That is holding the value as the User Id through which he is logging in Employee Portal.You can take a global variable in ur function say
ModifyHeadDatamangmnt,assign it at the top with UserId and use it where u need.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