UserInfo.getUserId() - returns the current User Id
Sample Code:
User Usr = new User();
Usr = [SELECT Phone, Id FROM User WHERE Id = : UserInfo.getUserId()];
the above code will return the current user's Phone and Id who execute this code.
Cheers!!!
Sample Code:
User Usr = new User();
Usr = [SELECT Phone, Id FROM User WHERE Id = : UserInfo.getUserId()];
the above code will return the current user's Phone and Id who execute this code.
Cheers!!!
very used full content.
ReplyDeleteYour posts are really helpful. Thank you for that!
ReplyDelete