0

I am using following code to get user profile properties in javascript, I can fetch first 3 properties but 4th property “QuickLinks” is always empty string, I have added some quick links in user profile but I am unable to fetch. Can I get “QuickLinks” in javscript?

function getUserProperties(targetUser) {

// Get the current client context and PeopleManager instance.
var clientContext = new SP.ClientContext.get_current();
var peopleManager = new SP.UserProfiles.PeopleManager(clientContext);

var profilePropertyNames = [“PreferredName”,”PictureURL”, “AboutMe”, “QuickLinks”];
var userProfilePropertiesForUser = new SP.UserProfiles.UserProfilePropertiesForUser(clientContext, targetUser, profilePropertyNames);
userProfileProperties = peopleManager.getUserProfilePropertiesFor(userProfilePropertiesForUser);

clientContext.load(userProfilePropertiesForUser);
clientContext.executeQueryAsync(onRequestSuccess, onRequestFail);
}

// This function runs if the executeQueryAsync call succeeds.
function onRequestSuccess() {

alert(userProfileProperties[3]);
}

(Visited 22 times, 1 visits today)
Add a Comment