IsEditable
Description
Returns True if the Entity object can be modified at this time. You can use this method to determine whether an EditEntry action resulted in a record that can be edited, or if the attempt to make the record modifiable failed.
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.
Syntax
VBScript
entity.IsEditable
Perl
$entity->IsEditable();
- Identifier
- Description
- entity
- An Entity object representing a user data record. Inside a hook, if you omit this part of the syntax, the Entity object corresponding to the current data record is assumed (VBScript only).
- Return value
- A Boolean whose value is True if the Entity is currently editable, otherwise False.
Examples
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.");
}