Méthode Entity.GetRelatedEntities

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

Gets 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 Function GetRelatedEntities(Of TEntity As Entity) ( _
    relationshipSchemaName As String, _
    primaryEntityRole As Nullable(Of EntityRole) _
) As IEnumerable(Of TEntity)
protected virtual IEnumerable<TEntity> GetRelatedEntities<TEntity> (
    string relationshipSchemaName,
    Nullable<EntityRole> primaryEntityRole
) 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
    The role of the primary entity in the relationship (referenced or referencing).

Valeur renvoyée

Type: IEnumerable
The collection of related entity instances for the specified relationship.

Exemple

GetRelatedEntities<CampaignResponse>("activity_pointer_campaignresponse", null);

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.