GetSubmitEntityDefNames
Description
Returns the names of the record types that are suitable for use in creating a new record.
This method returns the names that
are valid to use for the entitydef_name parameter of the BuildEntity
method.
Not all record types are appropriate for submitting new records. For
example, entries for the users stateless record type are added
using the HCL Compass Designer
interface, so users is not included in the returned list of names.
On the other hand, projects would be included because the projects
stateless record type has a submit action.
Typically, the return value contains at least one name; however, the return value can be an empty Variant if no state-based record types exist in the schema.
After using
this method to get the list of names, you can retrieve the EntityDef Object for a given
record type by calling the GetEntityDef
method.
Syntax
VBScript
session.GetSubmitEntityDefNames
Perl
$session->GetSubmitEntityDefNames
();
- Identifier
- Description
- session
- The Session object that represents the current database-access session.
- Return value
- For Visual Basic, a Variant containing an array of
strings is returned. Each string contains the name of one of the desired
record types.
For Perl, a reference to an array of strings is returned.
Examples
VBScript
set sessionObj = GetSession
' Get the list of names of the appropriate record types.
entityDefNames = sessionObj.GetSubmitEntityDefNames
' Iterate over the appropriate record types
for each name in entityDefNames
set entityDefObj = sessionObj.GetEntityDef(name)
' Do something with the EntityDef object
Next
Perl
#Create a HCL Compass session
$sessionObj = $entity->GetSession();
$entityDefNames = $sessionObj->GetSubmitEntityDefNames();
#Iterate over the suitable record types
foreach $name (@$entityDefNames){
$entityDefObj = $sessionObj->GetEntityDef( $name );
#Do something with the EntityDef object
# ...
}