Tag Info

Hot answers tagged


Getting only the current user won't be enough to get user profile properties. You need to use the PeopleManager as well. Your code should look something like this: var context = SP.ClientContext.get_current() var web = context.get_web(); var user = web.get_currentUser(); var peopleManager = new SP.UserProfiles.PeopleManager(context); var personProperties = ...


Since I have to load the userprofile script, I had to use: SP.SOD.executeFunc('userprofile', 'SP.UserProfiles.PeopleManager', function() { var clientContext = new SP.ClientContext.get_current(); var personProperties = new SP.UserProfiles.PeopleManager(clientContext).getMyProperties(); clientContext.load(personProperties); ...


Office location is being user to get the location of the office i.e USA, UK, West campus etc.As this property is set the location using the term set. I think this property being used when a company having office in different locations and they categorized them in multiple zone i.e North America, South America. While on other hand office property get the ...


You can get check the link for getting user info(ID, First Name, Last Name, Email, Username, Name) by User login Name. http://sharepoint.stackexchange.com/a/146788/40602 Use following way to set people or group field in javascript var user = User_ID + ';#' + User_Name; listItem.set_item(fieldName, users); listItem.update();


The supported method is to migrate the User Profile Service Databases together - you can't do them separately. All your noteboard entries are stored in the UserProfile Social Database. You could try: Use API to query the user profile service and export the required values and then re-import them into destination farm. Attempt to use only the social ...


There are a few methods that should help you here: GetPeers GetManagers GetDirectReports There is no "easy way" that I've found but you can write your own helper classes that use these methods.


Below is your answer Guid fieldID8 = item.Fields.GetFieldByInternalName("MyField").Id; string valueField8 = item[fieldID8].ToString(); SPFieldUserValueCollection userField8 = (SPFieldUserValueCollection)item.Fields[fieldID8].GetFieldValue(valueField8); DataTable dt = new DataTable(); dt.Columns.Add("ImageUrl", Type.GetType("System.String")); ...

Only top voted, non community-wiki answers of a minimum length are eligible