Hello,
I tried to add several custom fields for file entities in OneDrive for Business. They should be hidden from end users completely. I've created a custom fields for list called "Documents" using SharePoint CSOM:
var list = context.Web.Lists.GetByTitle("Documents"); ClientObjectPrototype allFields = list.Fields.RetrieveItems(); allFields.Retrieve(FieldPropertyNames.Title, FieldPropertyNames.InternalName); context.ExecuteQuery(); if (!list.Fields.Any(f => f.InternalName == "Os33_x002e_CustomProperty5")) { list.Fields.AddFieldAsXml( "<Field Type='Number' Name='Os33.CustomProperty5' Viewable='false' " + "ShowInDisplayForm ='false' ShowInEditForm='false' ShowInFileDialog='false' " + "ShowInFileDlg='false' ShowInListSettings='false' ShowInNewForm='false' " + "ShowInVersionHistory='false' ShowInViewForms='false' " + "Required='false' Hidden='true' Decimals='0' Min='0' DisplayName='Os33.CustomProperty5'><Default>0</Default></Field>", false, AddFieldOptions.AddToAllContentTypes); list.Update(); context.ExecuteQuery(); }But editor for field is shown on the file's Property page. How to hide this field?