I'm trying to query the User Profile for the current logged in user. Per examples I've seen, I should reference the SP.UserProfiles.js file in my executeOrDelay call:
But when I do, I get the following error, and nothing happens:
Uncaught TypeError: Cannot read property 'parentElement' of null at RTE.Canvas.checkCurrentFocus (VM13459 sp.ui.rte.js:2)
When I change the reference to just plain sp.js instead of SP.UserProfiles.js, I get an error "cannot read property 'PeopleManager' of undefined
var clientContext= new SP.ClientContext.get_current(); var peopleManager= new SP.UserProfiles.PeopleManager(clientContext);
on the peopleManager variable. I realize that it can't read the PeopleManager because I haven't explicitly loaded the SP.UserProfiles.js file, but why would it just do nothing when I call it outright? Do I need to split this up into two separate actions, one to just get the context (and therefore the current user), and then from within the context do a second call to the UserProfiles.js to get the user profile info?