Del via


OrganizationServiceContextExtensions.AddLink-metode (OrganizationServiceContext, Entity, String, Entity, Nullable)

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

Adds a link between two entity instances.

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

Brug

'Brug
Dim context As OrganizationServiceContext
Dim source As Entity
Dim relationshipSchemaName As String
Dim target As Entity
Dim primaryEntityRole As Nullable(Of EntityRole)

OrganizationServiceContextExtensions.AddLink(context, source, relationshipSchemaName, target, primaryEntityRole)

Syntaks

'Deklaration
<ExtensionAttribute> _
Public Shared Sub AddLink ( _
    context As OrganizationServiceContext, _
    source As Entity, _
    relationshipSchemaName As String, _
    target As Entity, _
    <OptionalAttribute> Optional primaryEntityRole As Nullable(Of EntityRole) = Nothing _
)
[ExtensionAttribute] 
public static void AddLink (
    OrganizationServiceContext context,
    Entity source,
    string relationshipSchemaName,
    Entity target,
    [OptionalAttribute] Nullable<EntityRole> primaryEntityRole
)

Parametre

  • source
    Type: Entity. The source entity instance.
  • relationshipSchemaName
    Type: Streng. The schema name of the relationship for the link.
  • target
    Type: Entity. The target entity instance.
  • primaryEntityRole
    Type: Kan være nul<EntityRole>. The role that the entity plays in the relationship, referencing or referenced.

Bemærkninger

This is an extension to the core AddLink method.

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

OrganizationServiceContextExtensions-klasse
OrganizationServiceContextExtensions-medlemmer
Microsoft.Xrm.Client-navneområde

Andre ressourcer

Developer Extensions for Microsoft Dynamics CRM
Access Entity Relationships

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