• #36275
    Salesforce | Aman Aman #4
    Forcetalks

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

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

     

    #36276
    Salesforce | shariq shariq #1
    Forcetalks

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

    #36399
    Salesforce | Parul Parul #2
    Forcetalks

    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

Viewing 3 posts - 1 through 3 (of 3 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2019 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?