function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ColinKenworthy1ColinKenworthy1 

Is there an easy way to get the context user's email address in Apex ?

I dont see a UserInfo.getUserEmail() method to use in Apex.

 

In formula fields you can use $User.Email

 

Is the only way in Apex to run a Select statement ?

aalbertaalbert
I think you have to use a SOQL query.
ColinKenworthy1ColinKenworthy1
I was afraid so. It would be a useful addition to the UserInfo class.