SP.Field.deleteObject() Method

Applies to: SharePoint Foundation 2010

Deletes the field from the list, from the site, or from the content types within the list.

SP.Field.deleteObject();

Applies To

SP.Field Class

Exceptions

Exceptions

Descriptions

SPException

Thrown when the field has one or more dependent lookup fields, or the field is a site column used in a list. Error code: -2146232832.

SPException

Thrown when the field is inherited from the base type of the list and SP.Field.canBeDeleted Property is false. Error code: -2130575215.

SPException

Thrown when the field is hidden. Error code: -2130575214.

SPException

Thrown when the SP.Field.sealed Property is true and the SP.Field.canBeDeleted Property is false. Error code: -2130575213.

SPException

thrown when the SP.Field.readOnlyField Property is true. Error code:-2130575212.

SPQueryThrottledException

Thrown when the throttling limit is exceeded by the operation. Error code: -2147024860.

ArgumentException

Thrown when the field does not exist. Error code: -2147024809.

InvalidOperationException

Thrown when the SP.Field.canBeDeleted Property of the field is false. Error code: -1.

UnauthorizedAccessException

Thrown when the current user has insufficient permissions. Error code: -2147024891.

See Also

Reference

SP.Field Methods

SP.Field Properties

SP Namespace