IOrganizationServiceFactory.CreateOrganizationService Method (Nullable<Guid>)
Applies To: Dynamics CRM 2015
Returns an IOrganizationService instance for the organization that the specified user is a member of.
Namespace: Microsoft.Xrm.Sdk
Assembly: Microsoft.Xrm.Sdk (in Microsoft.Xrm.Sdk.dll)
Syntax
IOrganizationService CreateOrganizationService(
Nullable<Guid> userId
)
IOrganizationService^ CreateOrganizationService(
Nullable<Guid> userId
)
abstract CreateOrganizationService :
userId:Nullable<Guid> -> IOrganizationService
Function CreateOrganizationService (
userId As Nullable(Of Guid)
) As IOrganizationService
Parameters
userId
Type: System.Nullable<Guid>Type: Nullable<Guid>. 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.
Return Value
Type: Microsoft.Xrm.Sdk.IOrganizationService
Type: IOrganizationService
An organization service factory object.
See Also
IOrganizationServiceFactory Interface
Microsoft.Xrm.Sdk Namespace
Return to top
© 2016 Microsoft. All rights reserved. Copyright