Κοινή χρήση μέσω


ConcurrencyBehavior Enumeration

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

Contains values to indicate the optimistic concurrency behavior that should be applied when performing entity update and delete operations.

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

Syntax

[DataContractAttribute(Name = "ConcurrencyBehavior", Namespace = "https://schemas.microsoft.com/xrm/7.1/Contracts")]
public enum ConcurrencyBehavior
<DataContractAttribute(Name := "ConcurrencyBehavior", Namespace := "https://schemas.microsoft.com/xrm/7.1/Contracts")>
Public Enumeration ConcurrencyBehavior

Members

Member name Description
AlwaysOverwrite

Specifies the behavior where an update or delete operation is applied without regard to the version of the record in the database. Value = 2.

If optimistic concurrency is not enabled for the target entity, the AlwaysOverwrite behavior is applied.

Default

Specifies to use the default behavior. Value = 0.

The default value is also used if no value is set in the ConcurrencyBehavior property of the request. The meaning of “default” is interpreted differently based on the calling context.

IfRowVersionMatches

Specifies the behavior where an update or delete operation is only applied if the entity record in the database has the same row version as the entity or entity reference in the request. Value = 1.

If no row version value is provided on the entity or entity references in the request, the request fails immediately.

Remarks

For the Default option, the following behavior applies based on the indicated conditions.

IsOptimisticConcurrencyEnabled

Source

Behavior

No

Any

AlwaysOverwrite

Yes

Any

AlwaysOverwrite

Yes

Web service

IfVersionMatches

Yes

Plug-in/custom workflow activity

AlwaysOverwrite

See Also

Microsoft.Xrm.Sdk Namespace
Reduce potential data loss using optimistic concurrency

Return to top

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright