IsDuplicate

Description

Indicates whether this Entity object has been marked as a duplicate of another Entity object.

A duplicate object reflects the changes made to the original object. When an Entity object is marked as a duplicate, any changes that occur to the original object are reflected in the duplicate as well. HCL Compass maintains a link between the original object and each one of its duplicates to update these changes.

Attempting to modify an object that is marked as a duplicate will result in an error; you must modify the original object instead. To locate the original object, you can use the GetOriginal method of the duplicate.

Syntax

VBScript


entity.IsDuplicate 

Perl


$entity->IsDuplicate(); 
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 this Entity object has been marked as a duplicate of another Entity object, otherwise False.

Examples

VBScript


'Display a window indicating which record is
'the original of this record
If entity.IsDuplicate Then
   ' Get the ID of this record
   duplicateID = entity.GetDisplayName

   ' Get the ID of the original record
   set originalObj = entity.GetOriginal
   originalID = originalObj.GetDisplayName
   OutputDebugString "The parent of record " & duplicateID & _
            " is record " & originalID
End If 

Perl


# Display a window indicating which record is

# the original of this record



if ($entity->IsDuplicate)

 {

 # Get the ID of this record



 $duplicateID = $entity->GetDisplayName();



 # Get the ID of the original record

 $originalObj = $entity->GetOriginal();

 $originalID = $originalObj->GetDisplayName();

 $session->OutputDebugString("The parent of record
       ".$duplicateID. " is record ".$originalID);

 }