• alana_
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Hello,

 

I am using the OpenCTI API. One of the methods I could use to possibley obtain the logged in user of Salesforce is the method 'runApex'. So, I created an Apex class below. However, I am unable to get the user. Does anybody know how to successfully obtain the salesforce user from the Apex class. Any ideas?

 

global class GetCurrentUser{

    webService static String getUserName(String name) {
        System.debug('User Id: ' + UserInfo.getUserId());
        return UserInfo.getUserId();
    }
}

  • January 26, 2013
  • Like
  • 0

Hello,

 

I am using the OpenCTI API. One of the methods I could use to possibley obtain the logged in user of Salesforce is the method 'runApex'. So, I created an Apex class below. However, I am unable to get the user. Does anybody know how to successfully obtain the salesforce user from the Apex class. Any ideas?

 

global class GetCurrentUser{

    webService static String getUserName(String name) {
        System.debug('User Id: ' + UserInfo.getUserId());
        return UserInfo.getUserId();
    }
}

  • January 26, 2013
  • Like
  • 0