CrmServiceClient.CloseActivity Method (String, Guid, String, String, Guid)

 

Applies To: Dynamics CRM 2015

Closes the Activity type specified. The Activity Entity type supports fax , letter , and phonecall

*Note: This will default to using English names for Status. if you need to use Non-English, you should populate the names for completed for the status and state.

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

Syntax

public bool CloseActivity(
    string activityEntityType,
    Guid activityId,
    string stateCode = "completed",
    string statusCode = "completed",
    Guid batchId = null
)
public:
bool CloseActivity(
    String^ activityEntityType,
    Guid activityId,
    String^ stateCode = "completed",
    String^ statusCode = "completed",
    Guid batchId = null
)
member CloseActivity : 
        activityEntityType:string *
        activityId:Guid *
        stateCode:string = "completed" *
        statusCode:string = "completed" *
        batchId:Guid = null -> bool
Public Function CloseActivity (
    activityEntityType As String,
    activityId As Guid,
    stateCode As String,
    statusCode As String,
    batchId As Guid
) As Boolean

Parameters

  • activityEntityType
    Type: System.String

    Type of Activity you would like to close.. Supports fax, letter, phonecall

  • activityId
    Type: System.Guid

    ID of the Activity you want to close

  • stateCode
    Type: System.String

    State Code configured on the activity

  • 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.Boolean

true if success false if not.

See Also

CrmServiceClient Class
Microsoft.Xrm.Tooling.Connector Namespace

Return to top

© 2016 Microsoft. All rights reserved. Copyright