mibuso.com

Microsoft Business Solutions online community
It is currently Sat May 25, 2013 2:22 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: [Solved] Get full domain userid
PostPosted: Tue Oct 23, 2007 5:11 am 
Offline

Joined: Wed Sep 28, 2005 9:06 am
Posts: 58
Location: INDONESIA
Country: Indonesia (id)
How to get full domain name and login ? If the login information is DOMAIN\john, the USERID field only return the value of "john" instead of full login information "DOMAIN\john".

I need this function because I created a user authorization table which consist of windows login user (the customer use windows authentication), my table keeps the record of login which is a completed information "DOMAIN\john" (lookup from windows login table), when it comes to user comparison, the system can't find if the user actually exists on the table, because USERID command only return "john".


Last edited by ayashi on Tue Oct 23, 2007 8:58 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 23, 2007 6:40 am 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Thu Oct 16, 2003 8:50 am
Posts: 12265
Location: Brno
Country: Czech Republic (cz)
Try to use automation "'Windows Script Host Object Model'.WshNetwork" for getting more info about the logged user. (UserName and UserDomain properties).

_________________
Kamil Sacek
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.


Top
 Profile E-mail WWW  
 
 Post subject:
PostPosted: Tue Oct 23, 2007 8:52 am 
Offline

Joined: Wed Sep 28, 2005 9:06 am
Posts: 58
Location: INDONESIA
Country: Indonesia (id)
thank kine, you're right, using automation, I could retrieve the domain and user name, then combine it using '/' \:D/ thanks a lot


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 21, 2007 8:53 am 
Offline
Moderator
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Wed Jul 02, 2003 10:13 am
Posts: 7504
Location: Milan
Country: Italy (it)
[Topic moved from Navision forum to Navision Tips & Tricks forum]

_________________
Regards,Alain Krikilion
Use the SEARCH,Luke! || No PM,please use the forum. || May the <SOLVED>-attribute be in your title! || Read Forum Rules before making a posting


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 21, 2007 7:48 pm 
Offline
MVP Microsoft Dynamics NAV

Joined: Wed Dec 15, 2004 6:11 pm
Posts: 8703
Location: 3rd rock from sun
Country: United States (us)
message(environ('USERDOMAIN') + '\' + USERID) ;

Should give you the information as well.

_________________
Rashed.

blog: http://mibuso.com/blogs/ara3n/


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 22, 2007 8:37 am 
Offline
Moderator
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Wed Jul 02, 2003 10:13 am
Posts: 7504
Location: Milan
Country: Italy (it)
ara3n wrote:
message(environ('USERDOMAIN') + '\' + USERID) ;

Should give you the information as well.

better:
Code: Select all
message('%1',environ('USERDOMAIN') + '\' + USERID);

Otherwise the \ is interpreted as a carriage return-line feed.

_________________
Regards,Alain Krikilion
Use the SEARCH,Luke! || No PM,please use the forum. || May the <SOLVED>-attribute be in your title! || Read Forum Rules before making a posting


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: