BuildEntity
Description
Creates a new record of the specified type and begins a submit action.
This method creates a new record and initiates a submit action,
thus enabling you to begin editing the record's contents. (You do not need
to call EditEntity
to
make the record editable.) You can assign values to the new record's fields
using the SetFieldValue
method
of the returned Entity object. When you are done updating the record, use
the Validate
and Commit
methods
of the Entity object to validate and commit any changes you made to the record,
respectively.
The name you specify in the entitydef_name
parameter must also correspond to an appropriate record type in the schema.
To obtain a list of legal names for entitydef_name, use the GetSubmitEntityDefNames
method.
Syntax
VBScript
session.BuildEntity
(entitydef_name)
Perl
$session->BuildEntity
(entitydef_name);
- Identifier
- Description
- session
- The Session object that represents the current database-access session.
- entitydef_name
- A String containing the name of the EntityDef Object to use as a template when creating the record.
- Return value
- A new Entity Object that was built using the named EntityDef object as a template.
Examples
VBScript
set sessionObj = GetSession
' Create a new "defect" record
set entityObj = sessionObj.BuildEntity("defect")
Perl
$sessionobj = $entity->GetSession();
# Create a new "defect" record
$entityobj = $sessionobj->BuildEntity("defect");