Méthode Entity.SetRelatedEntity

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

Sets the related entity instance 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 SetRelatedEntity(Of TEntity As Entity) ( _
    relationshipSchemaName As String, _
    primaryEntityRole As Nullable(Of EntityRole), _
    entity As TEntity _
)
protected virtual void SetRelatedEntity<TEntity> (
    string relationshipSchemaName,
    Nullable<EntityRole> primaryEntityRole,
    TEntity entity
) 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).
  • entity
    Type: Entity. The entity instance to set.

Exemple

SetRelatedEntity<mbs_project>("mbs_project_workiem", 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.