ClientContext clientContext = new ClientContext("url");List listInstance = clientContext.Web.Lists.GetByTitle("list name");ListItem item = listInstance .GetItemById(list id);clientContext.Load(item);FieldUserValue userValue = item["user type field internal name"] as FieldUserValue;clientContext.ExecuteQuery();string username = userValue.LookupValue.ToSTring();
----------------------------------------------------------------------------------------------------------source: https://social.technet.microsoft.com/Forums/Windows/en-US/3d367e58-91ec-4547-8e55-f1635eaec5bf/how-to-get-value-from-people-picker-field-using-c-in-sharepoint-2010?forum=sharepointdevelopmentprevious
No comments:
Post a Comment