IPluginExecutionContext Interface
![]() |
[Applies to: Microsoft Dynamics CRM 4.0]
Defines the contextual information passed to a plug-in at run-time.
The IPluginExecutionContext interface exposes the following members.
| Instance Method | Description |
| CreateCrmService | Returns an instance of the CrmService Web service. |
| CreateMetadataService | Returns an instance of the MetadataService Web service. |
| Instance Property | Description |
| BusinessUnitId | Gets the global unique identifier of the business unit that the entity belongs to. |
| CallerOrigin | Gets the source of the event - the Web application, Asynchronous Service, Web service, or offline playback. |
| CorrelationId | Gets the global unique identifier for tracking plug-in execution. |
| CorrelationUpdatedTime | Gets the updated time used for infinite loop detection. |
| Depth | Gets the current depth of execution in the call stack. |
| InitiatingUserId | Gets the ID of the system user account under which the current pipeline is executing. |
| InputParameters | Gets the parameters of the request message which triggered the event. |
| InvocationSource | Gets a value indicating whether the plug-in was executed by a parent or child pipeline. |
| IsExecutingInOfflineMode | Gets whether the plug-in is executing from the Microsoft Dynamics CRM for Outlook with Offline Access while it is offline. |
| MessageName | Gets the name of the Web service message that is being processed by the event execution pipeline. |
| Mode | Gets the mode of plug-in execution. |
| OrganizationId | Gets the global unique identifier of the organization that the entity belongs to and the plug-in executes under. |
| OrganizationName | Gets the name of the organization that the entity belongs to and the plug-in executes under. |
| OutputParameters | Gets the properties of the response message which is returned as part of pipeline execution. |
| ParentContext | Gets the execution context from the parent pipeline. This property is set when a plug-in executes in a child pipeline. |
| PostEntityImages | Gets the properties of the primary entity after the core platform operation has been completed. |
| PreEntityImages | Gets the properties of the primary entity before the core platform operation has occurred. |
| PrimaryEntityName | Gets the name of the primary entity for which the pipeline is processing events. |
| SecondaryEntityName | Gets the name of the secondary entity that has a relationship with the primary entity. |
| SharedVariables | Gets the custom properties that are shared between plug-ins. |
| Stage | Gets the stage in the execution pipeline that the plug-in is registered for. |
| UserId | Gets the global unique identifier of the system user for whom the plug-in invokes Web service methods on behalf of. |
Requirements
Namespace: Microsoft.Crm.Sdk
Assembly: Microsoft.Crm.Sdk.dll
See Also
Concepts
Reference
© 2010 Microsoft Corporation. All rights reserved.
