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 Rational® ClearQuest® 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.
VBScript
session.GetSubmitEntityDefNames
Perl
$session->GetSubmitEntityDefNames();
For Perl, a reference to an array of strings is returned.
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 Rational ClearQuest 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
# ...
}