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

  • shariq

    Member
    September 22, 2018 at 10:48 am

    You can get the ID’s of all the currently logged in users by using this global function: UserInfo.getUserId().

  • Parul

    Member
    September 22, 2018 at 1:07 pm

    You can get the current user id like this.

    UserInfo.getUserId() which returns the user id of the current user.

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

    Hope it helps

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Free 5 Day Salesforce Challenge!

Video in

To access the signup form head over to www.talentstacker.com/Salesforce TalentStacker Podcast Salesforce Episode: https://talentstacker.libsyn.com/how-to-earn-60k-100k-a-year-within-6-months-without-a-college-degree-say-what-salesforce-career-development-path-with-bradley-rice Do you already have a job as a Salesforce Professional and…