GetEntityDef

Description

Returns the requested EntityDef object.

You can use this method to get an EntityDef object for either state-based or stateless record types. To get a list of all EntityDef names in the schema, call the GetEntityDefNames method. You can call other methods of Session to return the names of specific EntityDef subsets. To get an EntityDef that belongs to a family, use the methods specifically for families (given in See also below).

Syntaxe

VBScript

session.GetEntityDef(entitydef_name) 

Perl

$session->GetEntityDef(entitydef_name); 
Identificateur
Description
session
Objet Session représentant la session en cours d'accès à la base de données.
entitydef_name
A String containing the name of an EntityDef object.
Valeur renvoyée
The requested EntityDef object.

Exemples

VBScript

set sessionObj = GetSession 

' Get the list of names of the state-based record types. 
entityDefNames = sessionObj.GetEntityDefNames 

' Iterate over the state-based record types 
for each name in entityDefNames 
   set entityDefObj = sessionObj.GetEntityDef(name) 
   ' Do something with the EntityDef object 
   Next 

Perl

my($session, $nameList, $field, $entityDefObj, $actionName);

  $session=$entity->GetSession();

  $entityDefObj = $session->GetEntityDef(

                    $entity->GetEntityDefName());



  $session->OutputDebugString("##> Action names for " .

                    $entityDefObj->GetName() . "\n");



$nameList = $entityDefObj->GetActionDefNames();



foreach $actionName(@$nameList)

{

  $session->OutputDebugString("\t##> $actionName\n");

} 

Commentaires en retour