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 DevOps Plan 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

Perl


$session->GetSubmitEntityDefNames(); 
Identifier
Description
session
The Session object that represents the current database-access session.
Return value

A reference to an array of strings is returned.

Example

Perl


#Create a DevOps Plan 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

   # ...
   }