ExecuteWorkflowRequest ExecuteWorkflowRequest ExecuteWorkflowRequest ExecuteWorkflowRequest Class

Definition

Contains the data that’s needed to execute a workflow.

For the Web API use the ExecuteWorkflow Action .

Web API support for this message was added with December 2016 update for Microsoft Dynamics 365 (online) and December 2016 Service Pack for Microsoft Dynamics 365 (on-premises) .

public ref class ExecuteWorkflowRequest sealed : Microsoft::Xrm::Sdk::OrganizationRequest
[System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/crm/2011/Contracts")]
public sealed class ExecuteWorkflowRequest : Microsoft.Xrm.Sdk.OrganizationRequest
type ExecuteWorkflowRequest = class
    inherit OrganizationRequest
Public NotInheritable Class ExecuteWorkflowRequest
Inherits OrganizationRequest
Inheritance
ExecuteWorkflowRequestExecuteWorkflowRequestExecuteWorkflowRequestExecuteWorkflowRequest
Attributes

Examples


// Create an ExecuteWorkflow request.
      ExecuteWorkflowRequest request = new ExecuteWorkflowRequest()
      {
          WorkflowId = _workflowId,
          EntityId = _leadId
      };
      Console.Write("Created ExecuteWorkflow request, ");
// Execute the workflow.
      ExecuteWorkflowResponse response = (ExecuteWorkflowResponse)svc.Execute(request);
      Console.WriteLine("and sent request to service.");

Remarks

Message Availability

For this message to work, the caller must be connected to the server.

Usage

Pass an instance of this class to the Execute(OrganizationRequest) method, which returns an instance of ExecuteWorkflowResponse.

Privileges and Access Rights

To perform this action, the caller must have privileges on the Workflow entity and access rights on the record specified in the EntityId and WorkflowId properties. For a complete list of the privileges required, see ExecuteWorkflow message privileges.

Constructors

ExecuteWorkflowRequest() ExecuteWorkflowRequest() ExecuteWorkflowRequest() ExecuteWorkflowRequest()

Initializes a new instance of the ExecuteWorkflowRequest class.

Properties

EntityId EntityId EntityId EntityId

Gets or sets the ID of the record on which the workflow executes. Required.

ExtensionData ExtensionData ExtensionData ExtensionData

Gets or sets the structure that contains extra data. Optional.

(Inherited from OrganizationRequest)
InputArguments InputArguments InputArguments InputArguments

For internal use only.

Item[String] Item[String] Item[String] Item[String]

Gets or sets the indexer for the Parameters collection.

(Inherited from OrganizationRequest)
Parameters Parameters Parameters Parameters

Gets or sets the collection of parameters for the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)
RequestId RequestId RequestId RequestId

Gets or sets the ID of an asynchronous operation (system job). Optional.

(Inherited from OrganizationRequest)
RequestName RequestName RequestName RequestName

Gets or sets the name of the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)
WorkflowId WorkflowId WorkflowId WorkflowId

Gets or sets the ID of the workflow to execute. Required.

Applies to

See also