Activity Forums Salesforce® Discussions How to get the UserID of all the currently logged in users using Apex code in salesforce?

  • How to get the UserID of all the currently logged in users using Apex code in salesforce?

    Posted by Prachi on September 24, 2019 at 5:39 am

    How to get the UserID of all the currently logged in users using Apex code in salesforce?

    Laveena replied 5 years, 2 months ago 2 Members · 1 Reply
  • 1 Reply
  • Laveena

    Member
    September 24, 2019 at 7:05 am

    Hi Prachi,

    For apex Class, you may use and UserInfo.getUserId(), and for a Visualfroce page, you may use {!$User.Id}.

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos