GetChildEntity
Description
Returns the Entity object that is the child (duplicate) in a pair of linked Entity objects.
Syntax
VBScript
link.GetChildEntity
Perl
$link->GetChildEntity
();
- Identifier
- Description
- link
- A Link object, which connects a parent and child Entity object to each other.
- Return value
- The Entity object that is the child (duplicate).
Examples
VBScript
originalID = GetDisplayName
If HasDuplicates Then
duplicateLinkList = GetDuplicates
' Output the IDs of the parent/child records
Dim duplicateObj
For Each duplicateLink In duplicateLinkList
set duplicateObj = duplicateLink.GetChildEntity
duplicateID = duplicateObj.GetDisplayName
OutputDebugString "Parent ID:" & originalID & _
" child Id:" & duplicateID
Next
End if
Perl
$originalID = $entity->GetDisplayName();
if ($entity->HasDuplicates())
{
$duplicateLinkList = $entity->GetDuplicates();
# Find out how many duplicates there
# are so the for loop can iterate them.
# Output the IDs of the parent/child records
$numdups = $duplicateLinkList->Count();
for ($x = 0; $x < $numdups ; $x++)
{
$duplicateLink = $duplicateLinkList->Item($x);
$duplicateObj = $duplicateLink->GetChildEntity();
$duplicateID = $duplicateObj->GetDisplayName();
$session->OutputDebugString("Parent ID:".$originalID." child
Id:"$duplicateID);
}
}