简体   繁体   English

重命名 sharepoint 在线列表中的“内容类型”列

[英]Rename the “Content Type” column in sharepoint online list

I need to rename the default "Content Type" column in sharepoint online document library that has several content types.我需要重命名具有多种内容类型的 sharepoint 在线文档库中的默认“内容类型”列。 Is there a way to do it using CSOM or any other way?有没有办法使用 CSOM 或任何其他方式来做到这一点?

Thank you in advance.先感谢您。

Rename default Content Type field name like this:重命名默认内容类型字段名称,如下所示:

            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 SharePoint 在线:使用 PowerShell 重命名列表中的列

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM