Del via


CrmConfigurationManager.CreateContext-metode

Gælder for: Microsoft Dynamics CRM 2015, Microsoft Dynamics CRM Online

Retrieves the configured OrganizationServiceContext instance.

Navneområde: Microsoft.Xrm.Client.Configuration
Assembly: Microsoft.Xrm.Client (i Microsoft.Xrm.Client.dll)

Brug

'Brug
Dim contextName As String
Dim allowDefaultFallback As Boolean
Dim returnValue As OrganizationServiceContext

returnValue = CrmConfigurationManager.CreateContext(contextName, allowDefaultFallback)

Syntaks

'Deklaration
Public Shared Function CreateContext ( _
    <OptionalAttribute> Optional contextName As String = Nothing, _
    <OptionalAttribute> Optional allowDefaultFallback As Boolean = False _
) As OrganizationServiceContext
public static OrganizationServiceContext CreateContext (
    [OptionalAttribute] string contextName,
    [OptionalAttribute] bool allowDefaultFallback
)

Parametre

  • contextName
    Type: Streng. The context name.
  • allowDefaultFallback
    Type: Boolesk værdi. Whether to allow fallback to the default.

Returværdi

Type: OrganizationServiceContext
The configured context.

Sikkerhed i tråd

Alle offentlige statiske (Shared i Visual Basic) medlemmer af denne type er trådsikret. Alle medlemmer af forekomsten er ikke garanteret trådsikkerhed.

Platforme

Development Platforms

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

Target Platforms

Windows Server 2008,Windows Server 2012,Windows 7

Se også

Reference

CrmConfigurationManager-klasse
CrmConfigurationManager-medlemmer
Microsoft.Xrm.Client.Configuration-navneområde

Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.