DeleteEntity

Description

Deletes the specified record from the current database.

When you call this method, Rational ClearQuest deletes the specified entity using the action whose name you specified in the deleteActionName parameter. This action name must correspond to a valid action in the schema and it must be legal to perform the action on the specified entity.

Syntaxe

VBScript

session.DeleteEntity entity, deleteActionName 

Perl

$session->DeleteEntity(entity, deleteActionName); 
Identificateur
Description
session
Objet Session représentant la session en cours d'accès à la base de données.
entity
The Entity object corresponding to the record to be deleted.
deleteActionName
A String containing the name of the action to use when deleting the entity.
Valeur renvoyée
If there was a problem deleting the entity, this method returns a String containing the error message, otherwise this method returns an empty string ("").

Exemples

VBScript

set sessionObj = GetSession 

' Delete the record whose ID is "BUGDB00000042" using the "delete" ' action
set objToDelete = sessionObj.GetEntity("defect", "BUGDB00000042")
sessionObj.DeleteEntity objToDelete, "delete" 

Perl

$sessionobj = $entity->GetSession();



# Delete the record whose ID is "BUGDB00000010" using the "delete"
# action

$objtodelete = $sessionobj->GetEntity("defect", "BUGDB00000010");

$sessionobj->DeleteEntity($objtodelete,"delete"); 

Commentaires en retour