UnmarkEntityAsDuplicate

Description

Removes the indication that the specified record is a duplicate of another record.

This method breaks the linkage between a duplicate and original Entity object. You can call this method to break a link that was established by the user or by calling the MarkEntityAsDuplicate method. If the DUPLICATE action being undone caused a state transition, that transition is undone unless a subsequent state transition occurred after the DUPLICATE action. After this method returns, the record is editable and must be validated and committed using the Entity object's Validate and Commit methods, respectively.

Note: This method does not remove the association in the Parent-Child Entity table. The method removes the duplicate information from the Child entity, but does not remove the duplicate information from the Parent entity.

Syntax

VBScript


session.UnmarkEntityAsDuplicate duplicate, action_name 

Perl


$session->UnmarkEntityAsDuplicate(duplicate, action_name); 
Identifier
Description
session
The Session object that represents the current database-access session.
duplicate
The Entity Object (currently marked as a duplicate) that is to be modified.
action_name
A String that specifies the action to be performed on the duplicate. This parameter must contain the name of a valid action as defined in the schema. Such an action must have the ActionType UNDUPLICATE.
Return value
None.

Examples

VBScript


set sessionObj = GetSession 

' Remove the duplicate status of the entity with ID="BUGID00010345". 
' Use the action named "unduplicate". 
set oldDupEntityObj = sessionObj.GetEntity("defect", "BUGID00010345")
sessionObj.UnmarkEntityAsDuplicate oldDupEntityObj, "unduplicate" 

' Validate and commit the entity since it is currently modifiable. 
error = oldDupEntityObj.Validate 
if error = "" then 
   oldDupEntityObj.Commit 
End If 

Perl


#Get a HCL Compass session

$sessionObj = $entity->GetSession();



#Get the entity BUGID00010345

$oldDupEntityObj = $sessionObj->GetEntity( "defect", "BUGID00010345" );



#Remove the duplicate status of the entity with #ID="BUGID00010345"

#using the action "unduplicate"

$sessionObj->UnmarkEntityAsDuplicate( $oldDupEntityObj, "unduplicate" );



#Validate and commit the entity since it is currently modifiable.

$error = $oldDupEntityObj->Validate();



if ( $error eq "" ) {

   $oldDupEntityObj->Commit();

}