错误截图错误日志位置:C:\ProgramFiles\CommonFiles\microsoftshared\WebServerExtensions\15\LOGS主要错误ThecurrentuserisnotanSharePointServerfarmadministrator.处理过程查看了当前User确实不是场管理员,但......
2022-04-11 67 SharePoint ERROR the current user not Server farm 错误
最近,需要更新列表字段,字段的类型是用户和组,so写了这么一段代码
复制代码
function updateUserField(){
var ctx = new SP.ClientContext.get_current();
var list = ctx.get_web().get_lists().getByTitle('My List');
var item = list.getItemById(1);//Item Id
var assignedToVal = new SP.FieldUserValue();
assignedToVal.set_lookupId(12);//User Id in the site collection
item.set_item("AssignedTo",assignedToVal);//AssignedTo is a column name
item.update();
ctx.executeQueryAsync(
function() {
console.log('Updated');
},
function(sender,args) {
console.log('An error occurred:' + args.get_message());
}
);
}
ExecuteOrDelayUntilScriptLoaded(updateUserField, "sp.js");
标签: SharePointJavaScript更新用户和组字段最近
相关文章
SharePoint2013爬网报错AnunrecognizedHTTPresponsewasreceivedwhenattemptingtocrawlthisitem.Verifywhethertheitemcanbeaccessedusingyourbrowser.然后登陆网站,发现在服务器上输入3次用户名密码白页,考虑到......
2022-04-11 449 SharePoint ERROR unrecognized HTTP response was received
最近使用SharePoint中,遇到一个需要重命名网站集的需求,主要是网站用数据库备份/还原的方式,想要改网站集的地址,然后搜了一下PowerShell:$site=Get-SPSite-Identityhttp://server/sites/Demo$site.......
2022-04-11 299 SharePoint重命名网站集名称