IsEditable

Descripción

Devuelve True si el objeto Entity se puede modificar en este momento.Puede utilizar este método para determinar si una acción EditEntry ha generado un registro que se puede editar o si ha fallado el intento de convertir el registro en modificable.

Para editar un objeto Entity, debe crear un nuevo objeto utilizando BuildEntity, o bien, abrir un objeto existente para editarlo con EditEntity. Un objeto Entity permanece editable hasta que se confirman los cambios con el método Commit o se revierte el objeto Entity con el método Revert.

Sintaxis

VBScript

entity.IsEditable 

Perl

$entity->IsEditable(); 
Identificador
Descripción
entity
Un objeto Entity que representa un registro de datos de usuario. En un enganche, si se omite esta parte de la sintaxis, se presupone el objeto Entity correspondiente al registro de datos actual (sólo VBScript).
Valor de retorno
Un Boolean cuyo valor es True si la entidad es editable actualmente y, de lo contrario, False.

Ejemplos

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

 } 

Comentarios