GetQueryEntityDefNames
Description
Returns the names of the record types that are suitable for use in queries.
You can use any of the names returned by this method
in the entitydef_name parameter for the BuildQuery method.
(You can also retrieve an EntityDef object by calling the GetEntityDef method.)
Note: The record types built into DevOps Plan can
be used in queries, so the returned array is never empty.
Syntax
Perl
$session->GetQueryEntityDefNames();
- 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
$sessionObj = $entity->GetSession();
# Get the list of names of the record types that support queries.
$entityDefNames = $sessionObj->GetQueryEntityDefNames();
#Iterate over the state-based record types
foreach $name ( @$entityDefNames ){
$queryDefObj = $sessionObj->BuildQuery( $name );
#Fill in the query parameters and run it
# ...
}