Showing posts with label ClientPeoplePicker. Show all posts
Showing posts with label ClientPeoplePicker. Show all posts

Wednesday, June 8, 2016

How to add a user and multi users to the People picker field in a sharepoint list programmtically

Coding:

  if (spProjectListItem["USER"] != null)
      projectMemberValue = spProjectListItem["USER"].ToString();
      SPFieldUserValueCollection oFieldUserValueCollection = new SPFieldUserValueCollection(spDLRWeb,
                                                                                                                    spProjectListItem["ProjectMember"].ToString());
       spListItem["USER"] = oFieldUserValueCollection;

Friday, February 5, 2016

How to get ClientPeoplePicker value using javascript

var dispTitle = "Person";    
var pickerDiv = $("[id$='ClientPeoplePicker'][title='" + dispTitle + "']");    
var peoplePicker = SPClientPeoplePicker.SPClientPeoplePickerDict[pickerDiv[0].id];
peoplePicker.GetAllUserInfo();

enter image description here