GetOriginalID

Description

Returns the visible ID of this object's original Entity object.

Use this method to get the visible ID of the Entity object that is the immediate original of this object. The returned ID may correspond to an object that is a duplicate of another Entity object. See the GetOriginal method for information on how to track a string of duplicate records back to the source.

The returned ID is a string containing the defect number the user sees on the form and is of the format SITEnnnnnnn (for example, "PASNY00012343"). Do not confuse this ID with the invisible database ID, which is used internally by the database to keep track of records.

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.GetOriginalID 

Perl


$entity->GetOriginalID(); 
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 String containing the ID of this object's original Entity.

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
   originalID = entity.GetOriginalID
   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);

 }