7919155538_8ef0b3c95e_kb

Missing Site Column on a Custom Content Type

by jess on May 8, 2011

1 Comment

Recently, I ran into an odd issue in a SharePoint environment where a Site Column disappeared on a custom Content Type. I could still see it in the View, and it was holding a value, but I couldn’t see it on the Content Type page or anywhere else. A colleague pushed me into PowerShell, and I was able to do a quick analysis of the Site Column and see that somehow it had been set to Read Only. Once I set the value of Read Only to false, the field appeared like normal.

   1:  $site = new-object Microsoft.SharePoint.SPSite("http://site")
   2:  $web = $site.RootWeb
   3:  $missingField = $web.Fields["FieldName"]
   4:  $missingField.ReadOnlyField = $false
   5:  $missingField.Update()

One Comment

Add a Comment