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


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

Creates a new activity against the target entity type

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


public Guid CreateNewActivityEntry(
    string activityEntityTypeName,
    string regardingEntityTypeName,
    Guid regardingId,
    string subject,
    string description,
    string creatingUserId,
    Dictionary<string, CrmDataTypeWrapper> fieldList = null,
    Guid batchId = null
Public Function CreateNewActivityEntry (
    activityEntityTypeName As String,
    regardingEntityTypeName As String,
    regardingId As Guid,
    subject As String,
    description As String,
    creatingUserId As String,
    fieldList As Dictionary(Of String, CrmDataTypeWrapper),
    batchId As Guid
) As Guid


  • activityEntityTypeName
    Type: System.String

    Type of Activity you would like to create

  • regardingEntityTypeName
    Type: System.String

    Entity type of the Entity you want to associate with.

  • description
    Type: System.String

    Description Text of the Activity

  • regardingId
    Type: System.Guid

    ID of the Entity to associate the Activity too

  • creatingUserId
    Type: System.String

    User ID that Created the Activity *Calling user must have necessary permissions to assign to another user

  • batchId
    Type: System.Guid

    Optional: if set to a valid GUID, generated by the Create Batch Request Method, will assigned the request to the batch for later execution, on fail, runs the request immediately

Return Value

Type: System.Guid

Guid of Activity ID or Guid.empty

See Also

CrmServiceClient Class
Microsoft.Xrm.Tooling.Connector Namespace

Return to top

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright