You need to sign in to do that
Don't have an account?
Arunkumar Kathir
Current user mail ID in apex trigger
HI,
How to get current user's email ID in apex trigger? Please help.
Thanks,
Arunkumar
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
HI,
How to get current user's email ID in apex trigger? Please help.
Thanks,
Arunkumar
You can use the code below:
User current_user=[SELECT Email FROM User WHERE Id= :UserInfo.getUserId()] ;
c.Contact_Email__c = current_user.Email;
There is no direct method to get User Email unlike UserId
All Answers
You can use the code below:
User current_user=[SELECT Email FROM User WHERE Id= :UserInfo.getUserId()] ;
c.Contact_Email__c = current_user.Email;
There is no direct method to get User Email unlike UserId
getUserEmail()