Método OrganizationServiceContext.AddRelatedObject
Se aplica a: CRM 2015 on-prem, CRM Online
Adds a related entity to the OrganizationServiceContext and creates the link that defines the relationship between the two entities in a single request.
Espacio de nombres: Microsoft.Xrm.Sdk.Client
Ensamblado: Microsoft.Xrm.Sdk (en Microsoft.Xrm.Sdk.dll)
Sintaxis
'Declaración
Public Sub AddRelatedObject ( _
source As Entity, _
relationship As Relationship, _
target As Entity _
)
public void AddRelatedObject (
Entity source,
Relationship relationship,
Entity target
)
Parámetros
- source
Type: Entity. The parent entity that is being tracked by the context.
- relationship
Type: Relationship. The name of the attribute or navigation property that returns the related object based on an association between the two entities.
- target
Type: Entity. The related object that is being added.
Comentarios
This method essentially works by calling AddObject and AddLink.
Seguridad de hilo
Los miembros estáticos públicos (Shared en Visual Basic) de este tipo son seguros para el hilo. No se garantiza que los miembros de instancia sean seguros para el hilo.
Plataformas
Plataformas de desarrollo
Windows Vista, Windows Server 2003 y
Plataformas de destino
Windows Vista,Windows XP
Vea también
Referencia
Clase de OrganizationServiceContext
Miembros de OrganizationServiceContext
Espacio de nombres de Microsoft.Xrm.Sdk.Client
Send comments about this topic to Microsoft.
© 2014 Microsoft Corporation. All rights reserved.