IsDuplicate

説明

この Entity オブジェクトは別の Entity オブジェクトの重複 としてマークされているかどうかを示します。

重複オブジェクトには、オリジナル オブジェクトに行われた変更が反映されます。Entity オブジェクトが重複とマークされている場合、オリジナル オブジェクトに行われる変更はすべて、重複にも反映されます。IBM Rational ClearQuest は、オリジナル オブジェクトとその重複それぞれとのリンクを維持して、変更を更新します。

重複とマークされているオブジェクトを変更しようとするとエラーになります。そうしないで、オリジナル オブジェクト自体を変更する必要があります。オリジナル オブジェクトを特定するには、重複の GetOriginal メソッドを使用します。

構文

VBScript

entity.IsDuplicate 

Perl

$entity->IsDuplicate(); 
識別子
説明
entity
Entity オブジェクトは、ユーザー データ レコードを表します。構文のこの部分を省略すると、フック内では、現在のデータ レコードに対応する Entity オブジェクトが想定されます (VBScript のみ)。
戻り値
この Entity オブジェクトが別の Entity オブジェクトの重複としてマークされている場合は True、そうでない場合は False の Boolean。

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

 } 

フィードバック