How to update the People Picker column in SharePoint using Event Receiver
SPUser ouser =
properties.Web.EnsureUser(User);
SPFieldUserValueCollection
value = new SPFieldUserValueCollection();
value.Add(new SPFieldUserValue(properties.Web,
ouser.ID, ouser.Name));
SPList
olist = properties.Web.Lists["AssetMaster"];
SPListItem
oitem = olist.Items.Add();
oitem["UserColumn"] = value;
oitem.Update();
This comment has been removed by the author.
ReplyDelete