+ Start a Discussion
Yoshinori MoriYoshinori Mori 

username of UserObject

I would like to retreive the username in the UserObject.

What is the column name of the username in the UserObject?

Sorry, but I'm new to Apex, and a beginner in programming.

I appreciate if anyone could teach me.

 

What I want to do is retrieve the username in UserObject  referenced from other object.

 

Reagards

 

Mori

 

Best Answer chosen by Admin (Salesforce Developers) 
Afzal MohammadAfzal Mohammad

It should be

 

 

String strUserName = UserInfo.getUserName();

 

 

For all documentations go to

http://wiki.developerforce.com/index.php/Documentation

 

For apex reference go to

http://www.salesforce.com/us/developer/docs/apexcode/salesforce_apex_language_reference.pdf

 

Hope that helps.

 

Afzal

All Answers

Afzal MohammadAfzal Mohammad

It should be

 

 

String strUserName = UserInfo.getUserName();

 

 

For all documentations go to

http://wiki.developerforce.com/index.php/Documentation

 

For apex reference go to

http://www.salesforce.com/us/developer/docs/apexcode/salesforce_apex_language_reference.pdf

 

Hope that helps.

 

Afzal

This was selected as the best answer
Yoshinori MoriYoshinori Mori

Thank you very much Afzal

I'll check

 

Mori