Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

EntityState Enumeration

[Applies to: Microsoft Dynamics CRM 2011]

Indicates the state of an entity as tracked by the OrganizationServiceContext and indicates to the server the operation that should be performed for a related entity.

Namespace: Microsoft.Xrm.Sdk
Assembly: Microsoft.Xrm.Sdk (in Microsoft.Xrm.Sdk.dll)
'Usage

Member nameDescription
ChangedThe entity was changed since the last call to SaveChanges. Value = 2.
CreatedThe entity was created since the last call to SaveChanges. Value = 1.
UnchangedThe entity is unchanged since the last call to SaveChanges. Value = 0.

The OrganizationServiceContext sets this value after the SaveChanges method is called and uses this value to track changes to entities. You can also set this value to Changed for a related entity to indicate to the service context that the related entity has been changed and that those changes need to be passed to the server. The service context sends changes to the server when the SaveChanges method is called.


Development Platforms

Windows Server 2008

Target Platforms

Windows Server 2008, Windows 7 (All Versions), Windows Vista (All Versions)

Send comments about this topic to Microsoft.
© 2013 Microsoft Corporation. All rights reserved.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.