GetOriginal

Description

Returns the Entity object that is marked as the parent of this duplicate object.

Use this method to get the Entity object that is the immediate parent of this object.

The returned object may itself be a duplicate of another Entity object. To find the true original, call the IsDuplicate method of the returned object. If IsDuplicate returns True, call that object's GetOriginal method to get the next Entity object in the chain. Continue calling the IsDuplicate and GetOriginal methods until IsDuplicate returns False, at which point you have the true original.

Note: It is an error to call this method for an Entity object that is not a duplicate. You should always call the IsDuplicate method first to verify that the object is a duplicate.

Syntax

VBScript


entity.GetOriginal 

Perl


$entity->GetOriginal(); 
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
The Entity object of which entity is a duplicate.

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);

 }