+ Start a Discussion
acrozieracrozier 

pulling current users info

How can I modify the below code to pull from the current user instead of the name from the PM__c field?

 

u = [Select Extension, Email From User  where Name = :j.PM__c limit 1];

sales4cesales4ce

You can get current user's info like this:

 

String userId= userInfo.getUserId();

 

u=[Select Extension,Email from User Where Id=:userId];

 

Hope this helps.

 

Thanks,

Sales4ce