SharePoint2013 Set Value To PeoplePicker

时间:2022-09-16 20:08:38

var columnName = 'Display Name';
var userName = 'domain\\name';
var searchText = RegExp("FieldName=\"" + columnName + "\"", "gi");
$("td .ms-formbody").each(function() {
    if(searchText.test($(this).html())) {
    alert(userName);
        $(this).find("div[Title='xinix']").html(userName);
    }
});