Export (0) Print
Expand All

SPField.Update Method (Boolean)

Updates the database with changes that are made to the field and optionally propagates the changes to lists that implement the field.

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

[ClientCallableExceptionConstraintAttribute(FixedId = "Update3", ErrorCode = , Condition = "Trying to change UCC from false to true or trying to index the field and the current user does not have permission to do big list operation", 
	ErrorType = typeof(SPQueryThrottledException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "6", ErrorCode = , Condition = "Trying to change the type of a field which is also changing to be indexed or which is already indexed.", 
	ErrorType = typeof(SPException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "7", ErrorCode = , Condition = "Trying to AllowMultipleValues to true to a lookup field which is also changing to be indexed or which is already indexed.", 
	ErrorType = typeof(SPException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "FieldCalculatedFormula2", ErrorCode = , 
	Condition = "The formula for a FieldCalculated has a syntax error", 
	ErrorType = typeof(SPException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "FieldCalculatedFormula3", ErrorCode = , 
	Condition = "The formula for a FieldCalculated contains a circular reference", 
	ErrorType = typeof(SPException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "FieldCalculatedFormula4", ErrorCode = , 
	Condition = "The formula for a FieldCalculated refers to a field whose FieldTypeKind is not allowed in formula", 
	ErrorType = typeof(SPException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "5", ErrorCode = , Condition = "Trying to index and set UCC to true to a field and the field has duplicate values in the existing list items.", 
	ErrorType = typeof(SPException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "FieldCalculatedFormula7", ErrorCode = , 
	Condition = "The formula for a FieldCalculated refers functions or semi-calculated formula", 
	ErrorType = typeof(SPException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "FieldType1", ErrorCode = , Condition = "If the field is derived from a built-in field type or the field is referred by another Calculated Field and is not changing to either FieldType.Text, FieldType.Calculated, FieldType.Number, FieldType.Integer, FieldType.Currency, FieldType.DateTime, FieldType.Coice, or FieldType.Boolean or the field type change is not allowed", 
	ErrorType = typeof(SPException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "accessdenied", Condition = "User does not have permissions to update this list.", 
	ErrorType = typeof(UnauthorizedAccessException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "Update2", ErrorCode = , Condition = "Field does not exist", 
	ErrorType = typeof(SPException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "Update5", ErrorCode = , Condition = "Total Number of fields in the list exceeds the limit", 
	ErrorType = typeof(SPException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "FieldCalculatedFormula5", ErrorCode = , 
	Condition = "The formula for a FieldCalculated refers to a field that does not exist", 
	ErrorType = typeof(SPException))]
[ClientCallableAttribute(Name = "UpdateAndPushChanges")]
[ClientCallableExceptionConstraintAttribute(FixedId = "1", ErrorCode = , Condition = "Trying to set UCC property to true for a field which is not indexed", 
	ErrorType = typeof(SPException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "2", ErrorCode = , Condition = "Tying to un-index a field which does not allow duplicate values.", 
	ErrorType = typeof(SPException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "3", ErrorCode = , Condition = "Trying to change the type of a field which does not allow duplicate values.", 
	ErrorType = typeof(SPException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "4", ErrorCode = , Condition = "Trying to change the type of a field to bool where allowing duplicate values in the field is not supported.", 
	ErrorType = typeof(SPException))]
public void Update(
	bool pushChangesToLists
)

Parameters

pushChangesToLists
Type: System.Boolean

true to propagate changes to lists that implement the field; otherwise, false.

ExceptionCondition
SPException

An error was encountered during the operation.

Show:
© 2014 Microsoft