Jaa


Entity.SetRelatedEntities<TEntity> Method (String, Nullable<EntityRole>, IEnumerable<TEntity>)

 

Applies To: Dynamics CRM 2015

Sets the collection of related entity instances for the specified relationship.

Namespace:   Microsoft.Xrm.Sdk
Assembly:  Microsoft.Xrm.Sdk (in Microsoft.Xrm.Sdk.dll)

Syntax

protected virtual void SetRelatedEntities<TEntity>(
    string relationshipSchemaName,
    Nullable<EntityRole> primaryEntityRole,
    IEnumerable<TEntity> entities
)
where TEntity : Entity
protected:
generic<typename TEntity>
where TEntity : Entity
virtual void SetRelatedEntities(
    String^ relationshipSchemaName,
    Nullable<EntityRole> primaryEntityRole,
    IEnumerable<TEntity>^ entities
)
abstract SetRelatedEntities<'TEntity when 'TEntity : Entity> : 
        relationshipSchemaName:string *
        primaryEntityRole:Nullable<EntityRole> *
        entities:IEnumerable<'TEntity> -> unit
override SetRelatedEntities<'TEntity when 'TEntity : Entity> : 
        relationshipSchemaName:string *
        primaryEntityRole:Nullable<EntityRole> *
        entities:IEnumerable<'TEntity> -> unit
Protected Overridable Sub SetRelatedEntities(Of TEntity As Entity) (
    relationshipSchemaName As String,
    primaryEntityRole As Nullable(Of EntityRole),
    entities As IEnumerable(Of TEntity)
)

Parameters

  • relationshipSchemaName
    Type: System.String

    Type: String. The schema name of the relationship.

Type Parameters

  • TEntity
    Type: Entity. The type of the entity.

Examples

SetRelatedEntities<ActivityPointer>("Account_ActivityPointers", null, value);

See Also

Entity Class
Microsoft.Xrm.Sdk Namespace

Return to top

© 2016 Microsoft. All rights reserved. Copyright