Export (0) Print
Expand All
Expand Minimize

SPAddFieldOptions Enumeration

An enumerated list of options that can be applied when a new field is added to a list.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

[ClientCallableTypeAttribute(Name = "AddFieldOptions", ServerTypeId = "{2b6ef6c5-00b4-48ef-bc7c-2db4eb650057}")]
[FlagsAttribute]
[SubsetCallableTypeAttribute]
public enum SPAddFieldOptions

Member nameDescription
DefaultSet to a constant decimal value of 0. Same as AddToDefaultContentType.
AddToDefaultContentTypeSet to a constant decimal value of 1. Used to specify that a new field that is added to the list is also be added to the default content type in the site collection.
AddToNoContentTypeSet to a constant decimal value of 2. Used to specify that a new field is not be added to any content type. (If AddFieldToDefaultView or AddToAllContentTypes is set, either or both overrule this setting.)
AddToAllContentTypesSet to a constant decimal value of 4. Used to specify that a new field that is added to the specified list is also be added to all content types in the site collection.
AddFieldInternalNameHintSet to a constant decimal value of 8. Used to add an internal field name hint for the purpose of avoiding possible database locking or field renaming operations.
AddFieldToDefaultViewSet to a constant decimal value of 16. Used to specify that a new field that is added to the specified list is also be added to the default list view.
AddFieldCheckDisplayNameSet to a constant decimal value of 32. Used to confirm that no other field has the same display name.
Show:
© 2014 Microsoft