Activity Forums Salesforce® Discussions Do you know how to get the User Id of all logged-in users with Apex code?

  • Do you know how to get the User Id of all logged-in users with Apex code?

    Posted by Marziya on July 14, 2020 at 3:02 PM

    Do you know how to get the User Id of all logged-in users with Apex code?

    Shweta replied 6 years, 1 month ago 2 Members · 1 Reply
  • 1 Reply
  • Shweta

    Member
    July 14, 2020 at 3:10 PM

    You can get logged-in user id by using this,
    User users = [select id, name from user where id =: UserInfo.getUserId()];

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos