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. DevOps Plan 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
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.
- Return value
- A Boolean whose value is True if this Entity object has been marked as a duplicate of another Entity object, otherwise False.
Example
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);
}