OrganizationServiceContextExtensions.AddLink Method (OrganizationServiceContext, Entity, String, Entity, Nullable<EntityRole>)
Applies To: Dynamics CRM 2015
Adds a link between two entity instances.
Namespace: Microsoft.Xrm.Client
Assembly: Microsoft.Xrm.Client (in Microsoft.Xrm.Client.dll)
Syntax
public static void AddLink(
this OrganizationServiceContext context,
Entity source,
string relationshipSchemaName,
Entity target,
Nullable<EntityRole> primaryEntityRole = null
)
public:
[ExtensionAttribute]
static void AddLink(
OrganizationServiceContext^ context,
Entity^ source,
String^ relationshipSchemaName,
Entity^ target,
Nullable<EntityRole> primaryEntityRole = null
)
static member AddLink :
context:OrganizationServiceContext *
source:Entity *
relationshipSchemaName:string *
target:Entity *
primaryEntityRole:Nullable<EntityRole> = null -> unit
<ExtensionAttribute>
Public Shared Sub AddLink (
context As OrganizationServiceContext,
source As Entity,
relationshipSchemaName As String,
target As Entity,
primaryEntityRole As Nullable(Of EntityRole)
)
Parameters
context
Type: Microsoft.Xrm.Sdk.Client.OrganizationServiceContextType: OrganizationServiceContext. The service context.
source
Type: Microsoft.Xrm.Sdk.EntityType: Entity. The source entity instance.
relationshipSchemaName
Type: System.StringType: String. The schema name of the relationship for the link.
target
Type: Microsoft.Xrm.Sdk.EntityType: Entity. The target entity instance.
primaryEntityRole
Type: System.Nullable<EntityRole>Type: Nullable<EntityRole>. The role that the entity plays in the relationship, referencing or referenced.
Remarks
This is an extension to the core AddLink method.
See Also
AddLink Overload
OrganizationServiceContextExtensions Class
Microsoft.Xrm.Client Namespace
Return to top
© 2017 Microsoft. All rights reserved. Copyright