GetOriginal

説明

この重複オブジェクトの親としてマークされている Entity オブジェクトを戻します。

このメソッドは、このオブジェクトの直接の親である Entity オブジェクトを取得する場合に使用します。

戻されたオブジェクト自体が、別の Entity オブジェクトの重複である場合があります。真のオリジナルを検出するには、戻されたオブジェクトの IsDuplicate メソッドを呼び出します。IsDuplicate から True が戻された場合、そのオブジェクトの GetOriginal メソッドを呼び出して、チェーン内の次の Entity オブジェクトを取得します。IsDuplicate から False が戻されるまで (この時点で、真のオリジナルが検出されます)、IsDuplicate および GetOriginal メソッドの呼び出しを続けます。

注: 重複でない Entity オブジェクトに対してこのメソッドを呼び出すことはエラーです。常に、まず IsDuplicate メソッドを呼び出して、オブジェクトが重複であることを検証します。

構文

VBScript

entity.GetOriginal 

Perl

$entity->GetOriginal(); 
識別子
説明
entity
Entity オブジェクトは、ユーザー データ レコードを表します。構文のこの部分を省略すると、フック内では、現在のデータ レコードに対応する Entity オブジェクトが想定されます (VBScript のみ)。
戻り値
エンティティが重複である Entity オブジェクト。

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

 } 

フィードバック