Udostępnij za pośrednictwem


IPluginExecutionContext Interface

 

Applies To: Dynamics CRM 2015

Defines the contextual information passed to a plug-in at run-time. Contains information that describes the run-time environment that the plug-in is executing in, information related to the execution pipeline, and entity business information.

Namespace:   Microsoft.Xrm.Sdk
Assembly:  Microsoft.Xrm.Sdk (in Microsoft.Xrm.Sdk.dll)

Syntax

public interface IPluginExecutionContext : IExecutionContext
public interface class IPluginExecutionContext : IExecutionContext
type IPluginExecutionContext = 
    interface
        interface IExecutionContext
    end
Public Interface IPluginExecutionContext
    Inherits IExecutionContext

Properties

Name Description
System_CAPS_pubproperty BusinessUnitId

Gets the GUIDGUID of the business unit that the user making the request, also known as the calling user, belongs to.(Inherited from IExecutionContext.)

System_CAPS_pubproperty CorrelationId

Gets the GUID for tracking plug-in or custom workflow activity execution. (Inherited from IExecutionContext.)

System_CAPS_pubproperty Depth

Gets the current depth of execution in the call stack.(Inherited from IExecutionContext.)

System_CAPS_pubproperty InitiatingUserId

Gets the GUID of the system user account under which the current pipeline is executing.(Inherited from IExecutionContext.)

System_CAPS_pubproperty InputParameters

Gets the parameters of the request message that triggered the event that caused the plug-in to execute.(Inherited from IExecutionContext.)

System_CAPS_pubproperty IsExecutingOffline

Gets whether the plug-in is executing from the Microsoft Dynamics CRM for Microsoft Office Outlook with Offline Access client while it is offline. (Inherited from IExecutionContext.)

System_CAPS_pubproperty IsInTransaction

Gets a value indicating if the plug-in is executing within the database transaction.(Inherited from IExecutionContext.)

System_CAPS_pubproperty IsOfflinePlayback

Gets a value indicating if the plug-in is executing as a result of the Microsoft Dynamics CRM for Microsoft Office Outlook with Offline Access client transitioning from offline to online and synchronizing with the Microsoft Dynamics CRM server.(Inherited from IExecutionContext.)

System_CAPS_pubproperty IsolationMode

Gets a value indicating if the plug-in is executing in the sandbox.(Inherited from IExecutionContext.)

System_CAPS_pubproperty MessageName

Gets the name of the Web service message that is being processed by the event execution pipeline.(Inherited from IExecutionContext.)

System_CAPS_pubproperty Mode

Gets the mode of plug-in execution.(Inherited from IExecutionContext.)

System_CAPS_pubproperty OperationCreatedOn

Gets the date and time that the related System Job was created.(Inherited from IExecutionContext.)

System_CAPS_pubproperty OperationId

Gets the GUID of the related System Job.(Inherited from IExecutionContext.)

System_CAPS_pubproperty OrganizationId

Gets the GUID of the organization that the entity belongs to and the plug-in executes under.(Inherited from IExecutionContext.)

System_CAPS_pubproperty OrganizationName

Gets the unique name of the organization that the entity currently being processed belongs to and the plug-in executes under.(Inherited from IExecutionContext.)

System_CAPS_pubproperty OutputParameters

Gets the parameters of the response message after the core platform operation has completed.(Inherited from IExecutionContext.)

System_CAPS_pubproperty OwningExtension

Gets a reference to the related SdkMessageProcessingingStep or ServiceEndpoint.(Inherited from IExecutionContext.)

System_CAPS_pubproperty ParentContext

Gets the execution context from the parent pipeline operation.

System_CAPS_pubproperty PostEntityImages

Gets the properties of the primary entity after the core platform operation has been completed.(Inherited from IExecutionContext.)

System_CAPS_pubproperty PreEntityImages

Gets the properties of the primary entity before the core platform operation has begins.(Inherited from IExecutionContext.)

System_CAPS_pubproperty PrimaryEntityId

Gets the GUID of the primary entity for which the pipeline is processing events.(Inherited from IExecutionContext.)

System_CAPS_pubproperty PrimaryEntityName

Gets the name of the primary entity for which the pipeline is processing events.(Inherited from IExecutionContext.)

System_CAPS_pubproperty RequestId

Gets the GUID of the request being processed by the event execution pipeline.(Inherited from IExecutionContext.)

System_CAPS_pubproperty SecondaryEntityName

Gets the name of the secondary entity that has a relationship with the primary entity.(Inherited from IExecutionContext.)

System_CAPS_pubproperty SharedVariables

Gets the custom properties that are shared between plug-ins.(Inherited from IExecutionContext.)

System_CAPS_pubproperty Stage

Gets the stage in the execution pipeline that a synchronous plug-in is registered for.

System_CAPS_pubproperty UserId

Gets the GUID of the system user for whom the plug-in invokes web service methods on behalf of.(Inherited from IExecutionContext.)

Remarks

The execution context is passed to a plug-in at run time in the System.IServiceProvider parameter of the Execute method. You can obtain the context from the service provider as shown in the following plug-in code.


// Obtain the execution context from the service provider.
IPluginExecutionContext context = (IPluginExecutionContext)
    serviceProvider.GetService(typeof(IPluginExecutionContext));

See Also

Microsoft.Xrm.Sdk Namespace
Understand the data context passed to a plug-in
Write plug-ins to extend business processes

Return to top

© 2016 Microsoft. All rights reserved. Copyright