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

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.
Return value
A Boolean whose value is True if the Entity is currently editable, otherwise False.

Example

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

 }