IOrganizationServiceFactory.CreateOrganizationService Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 (Guid? userId);
abstract member CreateOrganizationService : Nullable<Guid> -> Microsoft.Xrm.Sdk.IOrganizationService
Public Function CreateOrganizationService (userId As Nullable(Of Guid)) As IOrganizationService
Parameters
Specifies the system user that calls to the service are made for.
When called in a plug-in, a null
value indicates the SYSTEM user and a Guid.Empty
value indicates the same user as IPluginExecutionContext. UserId. Any other value indicates a specific system user.
When called in a custom workflow activity, all service calls are made in the IWorkflowExecutionContext.UserId context.
Returns
An organization service factory object.