in the "Windows Login" Table (2000000054) there's a column SID so you can get it from there. But if you are working with Groups instead of users then there is just a entry for a group and you can't find the current user.
What do you want to do? Get the SID for the current User?
the problem is, that USERID returns "My Name" and for the Windows Login Table i need "DomainName\My Name".
Is there a way to get the current domain? or can i only set a filter with the value of the USERID to get the user with domain in the Windows Login table?
Answers
What do you want to do? Get the SID for the current User?
i want to get the SID for the current user.
the problem is, that USERID returns "My Name" and for the Windows Login Table i need "DomainName\My Name".
Is there a way to get the current domain? or can i only set a filter with the value of the USERID to get the user with domain in the Windows Login table?
SetFilter with '*%1',USERUID could work.
like:
Session.SETRANGE("My Session",TRUE);
Session.FIND
"Windows Login".SETRANGE(ID,Session."User ID");
"Windows Login".FIND
EXIT("Windows Login".SID)
Dan Lindström
NCSD Navision 2.00 since 1999 (Navision Certified Solution Developer)
MBSP Developer for Microsoft Dynamics NAV 2009
both works fine, but i chose the solution of danlindstrom. i think its more secure