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
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.
- Return value
- A Boolean whose value is True if the Entity has any duplicates, otherwise False.
Example
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);
}
}