Resource Query to Retreive UID

 2 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
SP
Veteran Member
Posts: 122
Veteran Member

We have need to map the NT0000000x id's to that actual users.  Historically, we have used listusermap and pumped that to some custom table (we even developed a custom drill around in AP for ease of data access).  However we have a couple of special wrinkles (i.e. also need employee number) which got me to wondering if it would be possible to pull the UID using a resource query and then convert that to the properly formatted NT0000000x id since all the NT0000000x really is the hexadecimal representation of the UID.

 What I need to know is how to build a resource query to return the UID.  Is this possible?

John Henley
Posts: 3355
See this article:
http://lawsonguru.com/Art...tegration-Nodes.aspx
Thanks for using the LawsonGuru.com forums!
John
Terry P
Veteran Member
Posts: 234
Veteran Member
Not sure if this is the same as what John posted, but this is what I use to do that within a PF.

var j=rqryIdentities_UID;
var hexchars = "0123456789abcdef";
var hv = "";

for (var i=0; i< 4; i++)
{
k = j & 15;
hv = hexchars.charAt(k) + hv;
j = j >> 4;
}
sNTID = "NT";
for (var x = hv.length; x < 8; x++)
{ sNTID = sNTID + "0" };
sNTID = sNTID + hv;