GetOriginal

설명

이 중복 오브젝트의 상위로 표시된 Entity 오브젝트를 리턴합니다.

해당 오브젝트의 즉각적 상위인 Entity 오브젝트를 가져오려면 이 메소드를 사용하십시오.

리턴된 오브젝트 자체가 다른 Entity 오브젝트의 중복일 수 있습니다. 진짜 원본을 찾으려면 리턴된 오브젝트의 IsDuplicate 메소드를 호출하십시오. IsDuplicate 메소드에서 True가 리턴되면 해당 오브젝트의 GetOriginal 메소드를 호출하여 체인 내의 다음 Entity 오브젝트를 가져오십시오. IsDuplicate에서 False가 리턴될 때까지 IsDuplicate 및 GetOriginal 메소드를 계속 호출하십시오. False가 리턴되면 진짜 원본을 찾은 것입니다.

참고: 중복이 아닌 Entity 오브젝트에 대해 이 메소드를 호출하는 것은 오류입니다. 항상 먼저 IsDuplicate 메소드를 호출하여 오브젝트가 중복인지를 확인해야 합니다.

구문

VBScript

entity.GetOriginal 

Perl

$entity->GetOriginal(); 
ID
설명
entity
사용자 데이터 레코드를 나타내는 Entity 오브젝트입니다. 후크 내에서 구문에 이 부분을 생략할 경우, Entity 오브젝트가 현재 데이터 레코드에 해당한다고 가정합니다(VBScript에만 해당).
Return value
엔티티가 중복된 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);

 } 

피드백