How to track User Id from Employee Portal

b2b_Vijayb2b_Vijay Member Posts: 76
edited 2007-04-03 in Navision e-Commerce
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.
Regards,
Vijay

Comments

  • IHateLinuxIHateLinux Member Posts: 223
    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,
    Rainer
  • surya.singhsurya.singh Member Posts: 38
    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.
Sign In or Register to comment.