Partager via


CRUDExtentions.CloseActivity Method

Definition

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.

public static bool CloseActivity (this Microsoft.PowerPlatform.Dataverse.Client.ServiceClient serviceClient, string activityEntityType, Guid activityId, string stateCode = "completed", string statusCode = "completed", Guid batchId = default, bool bypassPluginExecution = false);
static member CloseActivity : Microsoft.PowerPlatform.Dataverse.Client.ServiceClient * string * Guid * string * string * Guid * bool -> bool
<Extension()>
Public Function CloseActivity (serviceClient As ServiceClient, activityEntityType As String, activityId As Guid, Optional stateCode As String = "completed", Optional statusCode As String = "completed", Optional batchId As Guid = Nothing, Optional bypassPluginExecution As Boolean = false) As Boolean

Parameters

serviceClient
ServiceClient

ServiceClient

activityEntityType
String

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

activityId
Guid

ID of the Activity you want to close

stateCode
String

State Code configured on the activity

statusCode
String

Status code on the activity

batchId
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

bypassPluginExecution
Boolean

Adds the bypass plugin behavior to this request. Note: this will only apply if the caller has the prvBypassPlugins permission to bypass plugins. If its attempted without the permission the request will fault.

Returns

true if success false if not.

Applies to