CrmEntity.GetRelatedEntity<TEntity> Method (String, Nullable<EntityRole>)
Applies To: Dynamics CRM 2013
Gets the related entity instance for the specified relationship.
Namespace: Microsoft.Xrm.Client
Assembly: Microsoft.Xrm.Client (in Microsoft.Xrm.Client.dll)
Syntax
protected override TEntity GetRelatedEntity<TEntity>(
string relationshipSchemaName,
Nullable<EntityRole> primaryEntityRole
)
where TEntity : Entity
protected:
generic<typename TEntity>
where TEntity : Entity
virtual TEntity GetRelatedEntity(
String^ relationshipSchemaName,
Nullable<EntityRole> primaryEntityRole
) override
override GetRelatedEntity<'TEntity when 'TEntity : Entity> :
relationshipSchemaName:string *
primaryEntityRole:Nullable<EntityRole> -> 'TEntity
Protected Overrides Function GetRelatedEntity(Of TEntity As Entity) (
relationshipSchemaName As String,
primaryEntityRole As Nullable(Of EntityRole)
) As TEntity
Parameters
relationshipSchemaName
Type: System.StringType: String. The schema name of the relationship.
primaryEntityRole
Type: System.Nullable<EntityRole>Type: Nullable<EntityRole>. The role that the entity plays in the relationship, referencing or referenced.
Return Value
Type: TEntity
Type: TEntity
The related entity instance for the specified relationship where TEntity is an Entity.
Type Parameters
- TEntity
Type: Entity. The entity.
Remarks
Extends the core GetRelatedEntity<TEntity> method.
See Also
CrmEntity Class
Microsoft.Xrm.Client Namespace
Developer extensions for Microsoft Dynamics CRM 2013
Return to top