I need to rename the default "Content Type" column in sharepoint online document library that has several content types. Is there a way to do it using CSOM or any other way?
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();