IsEditable

Descrizione

Restituisce il valore True se l'oggetto Entity può essere modificato in questo momento.

Per modificare un oggetto Entity, è necessario creare un nuovo oggetto utilizzando BuildEntity o aprire un oggetto esistente per eseguire la modifica con EditEntity. Un oggetto Entity resta modificabile fino a quando non viene eseguito il commit delle modifiche con il metodo Commit o fino a quando non viene ripristinato con il metodo Revert.

Sintassi

VBScript

entity.IsEditable 

Perl

$entity->IsEditable(); 
Identificativo
Descrizione
entity
Un oggetto Entity che rappresenta un record di dati dell'utente. All'interno di un hook, se si omette questa parte della sintassi, viene utilizzato l'oggetto Entity corrispondente al record di dati corrente (solo VBScript).
Valore di ritorno
Un valore booleano il cui valore è True se l'oggetto Entity è correntemente modificabile, in caso contrario un valore False booleano.

Esempi

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.");

 } 

Feedback