I need to add new choice field to existed content type. I'd like to do it in feature activate segment. I understand, I need to get content type by ID or name, then create new choice field with my options, default value and choice type and at last add field to content type. I googled whole day but I don't understand how to realize it.

Show me please by example how to resolve my task.

1 Answer 1


Create the site column as a separate action from the content type, and then use a "FieldLinkCreationInformation" object to add the site column to the content type. See this page on msdn for a code sample, or google "FieldlinkCreationInformation" for more examples. Or, following is an incomplete PowerShell snippet with the important bits:

#load the existing site columns

#get a reference to the site column that needs to be added to a content type
$mySiteColumn= $web.Fields.GetByTitle($siteColumnName)

#Get the FieldLink, and add it to the content type 
$mySiteColumnLinkInfo = new-object Microsoft.SharePoint.Client.FieldLinkCreationInformation
$varthrowaway = $myContentType.FieldLinks.Add($mySiteColumnLinkInfo)

  • CSOM is not in my case. And didn't prefer use Powershell for such actions: I think all updates should be centralized store in wsp package for repeated use. Jul 19, 2017 at 20:38
  • WSP is on the way out. But if you want server-side, it's a similar procedure, in that the site column is created separately from the content type, and then added via fieldlinks. An example is here: c-sharpcorner.com/UploadFile/40e97e/…
    – Mike2500
    Jul 19, 2017 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.