Share via


OrganizationServiceContextExtensions.AddLink メソッド (OrganizationServiceContext, Entity, String, Entity, Nullable)

適用対象: Microsoft Dynamics CRM 2015, Microsoft Dynamics CRM Online

Adds a link between two entity instances.

名前空間: Microsoft.Xrm.Client
アセンブリ: Microsoft.Xrm.Client (Microsoft.Xrm.Client.dll に含まれる)

使用法

'使用
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)

構文

'宣言
<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
)

パラメーター

  • source
    Type: Entity. The source entity instance.
  • relationshipSchemaName
    Type: 文字列. The schema name of the relationship for the link.
  • target
    Type: Entity. The target entity instance.
  • primaryEntityRole
    Type: Nullable<EntityRole>. The role that the entity plays in the relationship, referencing or referenced.

備考

This is an extension to the core AddLink method.

スレッド セーフ

この種類のパブリックな静的 (Visual Basic では Shared) メンバーはスレッド セーフです。インスタンス メンバーがスレッド セーフであることは保証されません。

プラットフォーム

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

関連項目

参照

OrganizationServiceContextExtensions クラス
OrganizationServiceContextExtensions のメンバー
Microsoft.Xrm.Client 名前空間

他のリソース

Developer Extensions for Microsoft Dynamics CRM
Access Entity Relationships

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