IOrganizationServiceFactory.CreateOrganizationService(Nullable<Guid>) IOrganizationServiceFactory.CreateOrganizationService(Nullable<Guid>) IOrganizationServiceFactory.CreateOrganizationService(Nullable<Guid>) IOrganizationServiceFactory.CreateOrganizationService(Nullable<Guid>) Method

Definition

Returns an IOrganizationService instance for the organization that the specified user is a member of.

public:
 Microsoft::Xrm::Sdk::IOrganizationService ^ CreateOrganizationService(Nullable<Guid> userId);
public Microsoft.Xrm.Sdk.IOrganizationService CreateOrganizationService (Nullable<Guid> userId);
abstract member CreateOrganizationService : Nullable<Guid> -> Microsoft.Xrm.Sdk.IOrganizationService
Public Function CreateOrganizationService (userId As Nullable(Of Guid)) As IOrganizationService

Parameters

userId
Nullable<Guid>

Type: Nullable<Guid>. Specifies the system user that calls to the service are made for.

When called in a plug-in or custom workflow activity, a null value indicates the SYSTEM user and a Guid.Empty value indicates the same user as IPluginExecutionContext. UserId or IWorkflowContext. UserId. Any other value indicates a specific system user.

Returns

Applies to