Link.GetDestinationLink Method (String, String, String, String)

The GetDestinationLink method returns an XML string containing the collection of entities from the IntegrationEntityInstance table that are linked to the entity specified by SourceSystemID, SourceEntityType, and SourceEntityKey in an IntegrationEntityInstanceLink table entry. This method returns a collection of 0 to N entities.

Syntax

[Visual Basic .NET]
Public Sub GetDestinationLink(
  ByVal SourceSystemName As String,
  ByVal SourceEntityType As String,
  ByVal SourceEntityKey As String,
  ByRef DestinationEntities As String
)
[C#]
public void GetDestinationLink(
  string  SourceSystemName,
  string  SourceEntityType,
  string  SourceEntityKey,
  ref string  DestinationEntities
);
[C++]
public: void GetDestinationLink(
  String*  SourceSystemName,
  String*  SourceEntityType,
  String*  SourceEntityKey,
  String**  DestinationEntities
);

Parameters

SourceSystemName

Specifies a unique string name representing the source system. This data is from IntegrationSystemMaster.SystemName.

SourceEntityType

Specifies a predefined EntityType found in the source system's configuration data. This data is from IntegrationSystemEntity.EntityType. After a link has been saved, this can also be found in IntegrationEntityInstance.EntityType.

SourceEntityKey

Specifies the entity's key value found in the source system's business data. This data is from IntegrationEntityInstance.EntityKey.

DestinationEntities

[ref] An XML string containing IntegrationEntities linked to the source.

Return Value

No return value.

Other Overloads

Link.GetDestinationLink Method (String, String, String, String, String, String)

Example

GetDestinationLink("Microsoft CRM", 
      "Account", 
      "{4151EC5A-5506-4B2C-9D48-E9168331D7E5}", 
      stringForOutput);

GetDestinationLink("BackOfficeCompanyDB", 
      "Address", 
      "Addr1253", 
      stringForOutput); 

Sample Output

<IntegrationLinks>
   <IntegrationLink>
      <SystemName>BackOfficeCompanyDB</SystemName>
      <EntityType>Customer</EntityType>
      <EntityKey>AARONFITZ0001</EntityKey>
   </IntegrationLink>
   <IntegrationLink>
      <SystemName>Microsoft CRM</SystemName>
      <EntityType>Contact</EntityType>
      <EntityKey>{7359EC5A-5506-4B2C-9D48-E9168361D7D4}</EntityKey>
   </IntegrationLink>
</IntegrationLinks>

When no links are located, the output is the following string.

<IntegrationLinks/>

Preconditions

The following are the preconditions for this method:

SQL table name Description
IntegrationEntityInstance Contains any entity instances from either system that have been integrated. This table may be empty, but it must exist.
IntegrationEntityInstanceLink Contains any links between entities that have been integrated. This table may be empty but it must exist.

Postconditions

No changes occur in the data due to this operation.

Requirements

Namespace: Microsoft.CRM.Integration.Link

Assembly: microsoft.crm.integration.link.dll

See Also