EditEntity

Description

Performs the specified action on a record and makes the record available for editing.

The Entity object you specify in the entity parameter must have been previously obtained by calling GetEntityByDbId or GetEntity, or by running a query. If you created the Entity object using BuildEntity and have not yet committed it to the database, the object is already available for editing.

To obtain a list of legal values for the edit_action_name parameter, call the GetActionDefNames method of the appropriate EntityDef object.

After calling this method, you can call the methods of the Entity object to modify the fields of the corresponding record. When you are done editing the record, validate it and commit your changes to the database by calling the Entity object's Validate and Commit methods, respectively.

Syntax

VBScript

session.EditEntity entity, edit_action_name 

Perl

$session->EditEntity(entity, edit_action_name); 
Identifier
Description
session
The Session object that represents the current database-access session.
entity
The Entity Object corresponding to the record that is to be edited.
edit_action_name
A String containing the name of the action to initiate for editing. (For example: "modify" or "resolve")
Return value
None.

Examples

VBScript

set sessionObj = GetSession 

' Edit the record whose ID is "BUGDB00000010" using the "modify" ' ' action
set objToEdit = sessionObj.GetEntity("defect", "BUGDB00000010")
sessionObj.EditEntity objToEdit, "modify" 

Perl

$sessionobj = $entity->GetSession();



# Edit the record whose ID is "BUGDB00000010" using the "modify"
# action

$objtoedit = $sessionobj->GetEntity("defect", "BUGDB00000010");

$sessionobj->EditEntity($objtoedit,"modify"); 

Feedback