HasDuplicates

Description

Reports whether this object is the original of one or more duplicates.

An Entity can have more than one duplicate. Furthermore, an Entity can have duplicates and also be a duplicate itself. See the IsDuplicate and IsOriginal methods for details.

Syntax

VBScript


entity.HasDuplicates 

Perl


$entity->HasDuplicates(); 
Identifier
Description
entity
An Entity object representing a user data record. Inside a hook, if you omit this part of the syntax, the Entity object corresponding to the current data record is assumed (VBScript only).
Return value
A Boolean whose value is True if the Entity has any duplicates, otherwise False.

Examples

VBScript


originalID = GetDisplayName
If HasDuplicates Then
   duplicateLinkList = GetDuplicates

   ' Output the IDs of the parent/child records
   For Each duplicateLink In duplicateLinkList 
      duplicateObj = duplicateLink.GetChildEntity 
      duplicateID = duplicateObj.GetDisplayName 
      OutputDebugString "Parent ID:" & originalID & _ 
            " child Id:" & duplicateID 
   Next 
End if 

Perl


$originalID = $entity->GetDisplayName();

if ($entity->HasDuplicates())

 {

$session = $entity->GetSession();

$duplicateLinkList = $entity->GetDuplicates();

$cnt = $duplicateLinkList->Count();

 # Output the IDs of the parent/child records

for ($i = 0; $i<$cnt; $i++) 

{

   $itm = $duplicateLinkList->Item($i);

  $duplicateObj = $itm->GetChildEntity();

  $duplicateID = $duplicateObj->GetDisplayName();

  $session->OutputDebugString("Parent ID:".$originalID." child
       Id:"$duplicateID);

  }

 }