IsEditable

Description

Returns True if the Entity object can be modified at this time.

To edit an Entity object, you must either create a new object using BuildEntity or open an existing object for editing with EditEntity. An Entity object remains editable until you either commit your changes with the Commit method or revert the Entity object with the Revert method.

Syntaxe

VBScript

entity.IsEditable 

Perl

$entity->IsEditable(); 
Identificateur
Description
entity
Objet Entity représentant un enregistrement de données utilisateur. Si vous omettez cette partie de la syntaxe au sein d'un point d'ancrage, l'objet Entity correspondant à l'enregistrement de données en cours est faux (VBScript uniquement).
Return value
A Boolean whose value is True if the Entity is currently editable, otherwise False.

Exemples

VBScript

set sessionObj = GetSession 

set entityToEdit = sessionObj.GetEntity("defect", "BUGID00000042")

sessionObj.EditEntity entityToEdit, "modify" 

' Verify that the entity object was opened for editing. 
If Not entityToEdit.IsEditable Then 
   OutputDebugString "Error - the entity object could not be
       edited." 
End If 

Perl

$sessionObj = $entity->GetSession();



$entityToEdit = $sessionObj->GetEntity("defect", "BUGID00000042");

$sessionObj->EditEntity($entityToEdit, "modify");



# Verify that the entity object was opened for editing. 

if (!$entityToEdit->IsEditable())

 {

 $session->OutputDebugString("Error - the entity object could not be 
edited.");

 } 

Commentaires