look at this code..

vijay_g
vijay_g Member Posts: 884
hi,
i have found following code in codeunit that is looking some different from my approach.
User := UPPERCASE(USERID); // Uppercase in case of Windows Login
so in window login is there userid exist?

Comments

  • kine
    kine Member Posts: 12,562
    Yes, of course... :-) you didn't tried it? :whistle:
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • vijay_g
    vijay_g Member Posts: 884
    then why this being in uppercase? rather it's upper in default .
  • kine
    kine Member Posts: 12,562
    Because USERID is text and windows logins could be in lower case, but variable, with which it is compared, is of type CODE, thus each time upper case. To compare it correctly, you need to transform the USERID to uppercase too... ;-)

    Of course, it will have clear meaning if there is = instead :=, but in this case, someone wanted to be sure, that the value in User is uppercase each time. But because I do not know the variable type and context, hard to say.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.