IsOriginal

설명

Entity에 중복이 있으나 자신은 중복이 아닌 경우 True를 리턴합니다.

이 메소드는 Entity 오브젝트가 진짜 원본(즉 자신이 중복이 아님)인지 여부를 보고합니다. 이 메소드에서 True가 리턴될 경우, IsDuplicate 메소드는 False를 리턴해야 하고 HasDuplicates메소드는 True를 리턴해야 합니다. Entity 오브젝트를 원본으로 간주하려면 최소한 하나의 중복이 있어야 합니다.

구문

VBScript

entity.IsOriginal 

Perl

$entity->IsOriginal(); 
ID
설명
entity
사용자 데이터 레코드를 나타내는 Entity 오브젝트. 후크 내에서 구문에 이 부분을 생략할 경우, Entity 오브젝트가 현재 데이터 레코드에 해당한다고 가정합니다(VBScript에만 해당).
Return value
해당 오브젝트에 중복이 있으나 자신이 다른 Entity 오브젝트의 중복으로 표시되어 있지 않은 경우 값이 True인 부울.

예제

VBScript

'Display a window indicating the IDs of the
' the duplicates of this record
If entity.IsOriginal Then
   ' Get the ID of this record
   originalID = entity.GetDisplayName

   ' Display the IDs of its duplicates
   duplicateLinkList = entity.GetDuplicates
   For Each duplicateLink In duplicateLinkList
      duplicateObj = duplicateLink.GetChildEntity
      duplicateID = duplicateObj.GetDisplayName
      OutputDebugString "Parent ID:" & originalID & _
            " child Id:" & duplicateID 
   Next
End If 

Perl

# Display a window indicating the IDs of the

# the duplicates of this record

if ($entity->IsOriginal())

 {

 # Get the ID of this record

 $originalID = $entity->GetDisplayName();

   # Find out how many duplicates there
   # are so the for loop can iterate them. 
   # Display the IDs of its duplicates

   $duplicateLinkList = $entity->GetDuplicates();

   $numdups = $duplicateLinkList->Count();

   for ($x = 0; $x < $numdups ; $x++)

  {

   $duplicateLink = $duplicateLinkList->Item($x);
   $duplicateObj = $duplicateLink->GetChildEntity();
   $duplicateID = $duplicateObj->GetDisplayName();
   $session->OutputDebugString("Parent ID: ".$originalID." child
      Id:".$duplicateID);

  }

 } 

피드백