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.StringName of entity to create a record.
valueArray
Type: System.Collections.Generic.Dictionary<String, CrmDataTypeWrapper>List of initial values in the new entity record.
applyToSolution
Type: System.StringOptional. Applies the update with a solution by unique name.
enabledDuplicateDetection
Type: System.BooleanOptional. If true, duplicate detection is enabled; otherwise false.
batchId
Type: System.GuidOptional. 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