SP.FieldCollection.add(field) Method
Applies to: SharePoint Foundation 2010
Adds a field to the field collection.
var value = SP.FieldCollection.add(field);
Parameters
field
Type: SP.Field
The field to add to the collection.
Return Value
Type: SP.Field
The field added to the collection.
Applies To
Exceptions
Exceptions |
Descriptions |
---|---|
The field is not associated with a list. -or- The field has an ID that is the same as the ID of an existing field. -or- The field has been changed by another user -or- The field does not have a display name. -or- The field sets UCC to true for a field which cannot be set to false. Error code: -2146232832. |
|
The field does not exist. Error code: -2130575340. |
|
Formula is empty for the calculated field type. Error code: -2130575199. |
|
There is a throttle failure. Error code: -2147024860. |
|
There is a join throttle failure. Error code: -2147024749. |
|
Field with the specified internal name or title does not exist in the collection at the given scope. Error code: -2147024809. |
|
The current user has insufficient permissions. Error code: -2147024891. |