Méthode Entity.SetRelatedEntities

S'applique à: CRM 2015 on-prem, CRM Online

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

Espace de noms: Microsoft.Xrm.Sdk
Assembly: Microsoft.Xrm.Sdk (dans Microsoft.Xrm.Sdk.dll)

Syntaxe

'Déclaration
Protected Overridable Sub SetRelatedEntities(Of TEntity As Entity) ( _
    relationshipSchemaName As String, _
    primaryEntityRole As Nullable(Of EntityRole), _
    entities As IEnumerable(Of TEntity) _
)
protected virtual void SetRelatedEntities<TEntity> (
    string relationshipSchemaName,
    Nullable<EntityRole> primaryEntityRole,
    IEnumerable<TEntity> entities
) where TEntity : Entity

GenericParameters

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

Paramètres

  • relationshipSchemaName
    Type: Chaîne. The schema name of the relationship.
  • primaryEntityRole
    Type: EntityRole. The role of the primary entity in the relationship (referenced or referencing).
  • entities
    Type: IEnumerable. The collection of entity instances to set.

Exemple

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

Cohérence de thread

Tous les membres statiques publics (Shared dans Visual Basic) de ce type sont thread-safe. Tous les membres d'instance ne sont pas garantis thread-safe.

Plateformes

Plateformes de développement

Windows Vista, Windows Server 2003 et

Plateformes cibles

Windows Vista,Windows XP

Change History

Voir aussi

Référence

Classe Entity
Membres Entity
Espace de noms Microsoft.Xrm.Sdk

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