【问题标题】:Rename the "Content Type" column in sharepoint online list重命名 sharepoint 在线列表中的“内容类型”列
【发布时间】:2020-04-06 16:06:50
【问题描述】:

我需要重命名共享点在线文档库中具有多种内容类型的默认“内容类型”列。有没有办法使用 CSOM 或任何其他方式来做到这一点?

提前谢谢你。

【问题讨论】:

    标签: sharepoint-online csom


    【解决方案1】:

    像这样重命名默认的内容类型字段名称:

                List targetList = ctx.Web.Lists.GetByTitle("Documents");
                FieldCollection fields = targetList.Fields;
                ctx.Load(fields);
                ctx.ExecuteQuery();
                Field ctfield = fields.GetByInternalNameOrTitle("ContentType");
                ctx.Load(ctfield);
                ctx.ExecuteQuery();
                ctfield.Title = "CustomContentType";
                ctfield.Update();
                ctx.ExecuteQuery();
    

    SharePoint Online: Rename a Column in List using PowerShell

    【讨论】:

    • 谢谢,确实有效。由于一些本地化问题,它以前对我不起作用。我设置的名称被忽略,直到我将网站切换为正确的语言。无法解释...
    猜你喜欢
    • 2010-11-19
    • 1970-01-01
    • 1970-01-01
    • 2010-10-22
    • 1970-01-01
    • 1970-01-01
    • 2010-12-01
    • 2020-03-17
    • 1970-01-01
    相关资源
    最近更新 更多