Kopīgot, izmantojot


IOrganizationServiceAsync2.CreateAsync(Entity, CancellationToken) Method

Definition

Create an entity and process any related entities.

[System.ServiceModel.OperationContract]
public System.Threading.Tasks.Task<Guid> CreateAsync (Microsoft.Xrm.Sdk.Entity entity, System.Threading.CancellationToken cancellationToken);
[<System.ServiceModel.OperationContract>]
abstract member CreateAsync : Microsoft.Xrm.Sdk.Entity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Guid>
Public Function CreateAsync (entity As Entity, cancellationToken As CancellationToken) As Task(Of Guid)

Parameters

entity
Entity

The entity to create.

cancellationToken
CancellationToken

Propagates notification that operations should be canceled.

Returns

The ID of the created record.

Attributes

Applies to