Delen via


CrmServiceClient.CreateNewRecord Method (String, Dictionary<String, CrmDataTypeWrapper>, String, Boolean, Guid)

 

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

Uses the dynamic entity pattern to create a new entity record.

Namespace:   Microsoft.Xrm.Tooling.Connector
Assembly:  Microsoft.Xrm.Tooling.Connector (in Microsoft.Xrm.Tooling.Connector.dll)

Syntax

public Guid CreateNewRecord(
    string entityName,
    Dictionary<string, CrmDataTypeWrapper> valueArray,
    string applyToSolution = "",
    bool enabledDuplicateDetection = false,
    Guid batchId = null
)
Public Function CreateNewRecord (
    entityName As String,
    valueArray As Dictionary(Of String, CrmDataTypeWrapper),
    applyToSolution As String,
    enabledDuplicateDetection As Boolean,
    batchId As Guid
) As Guid

Parameters

  • entityName
    Type: System.String

    Name of entity to create a record.

  • applyToSolution
    Type: System.String

    Optional. Applies the update with a solution by unique name.

  • enabledDuplicateDetection
    Type: System.Boolean

    Optional. If true, duplicate detection is enabled; otherwise false.

  • batchId
    Type: System.Guid

    Optional. If set to a valid GUID (ID returned by the CreateBatchOperationRequest method), the request is assigned to a batch for later execution. If you do not specify a value in this parameter, the request to create an entity record runs immediately.

Return Value

Type: System.Guid

Returns a GUID (entity record ID) on Success; Guid.Empty if the request fails.

See Also

CrmServiceClient Class
Microsoft.Xrm.Tooling.Connector Namespace

Return to top

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright