Change Display Name of a field in Content type

Is it possible to change the display name of a Field in Content type using CSOM. We also want to change the description but these two properties are seems to be Read Only in field links property of content type. 

We have achieved it using powershell but would be helpful if the same is achieved using Client

May 27th, 2015 1:25am

Hi,

Please check the code snippet below:

ClientContext cc= new ClientContext(SiteUrl);
 Web site = cc.Web;
 var list = site.Lists.GetByTitle(listname);
 cc.Load(list.Fields.GetByTitle(fieldname));
 cc.ExecuteQuery();
 var field = list.Fields.GetByTitle(fieldname);

 field.DisplayName = "newName"; 
 field.Update(); 

 context.ExecuteQuery(); 

Here is a similar thread for your reference:

https://social.msdn.microsoft.com/Forums/office/en-US/0bf7a594-8ff1-4205-94e8-5ad460e280c8/is-it-possible-to-change-display-name-of-any-column-in-content-type-using-client-object-model?forum=sharepointgeneral

Best Regards

Free Windows Admin Tool Kit Click here and download it now
June 5th, 2015 2:50am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics