GetEntityDef

Descrizione

Restituisce l'Oggetto EntityDef richiesto.

È possibile utilizzare questo metodo per ottenere un oggetto EntityDef per i tipi di record stateless e basati sullo stato. Per ottenere un elenco di tutti i nomi EntityDef nello schema, richiamare il metodo GetEntityDefNames. È possibile richiamare gli altri metodi dell'oggetto Session per restituire i nomi delle sottoserie EntityDef specifiche. Per ottenere un EntityDef che appartenga a una famiglia, utilizzare i metodi specifici per le famiglie (riportati di seguito nella sezione Consultare anche).

Sintassi

VBScript

session.GetEntityDef(entitydef_name) 

Perl

$session->GetEntityDef(entitydef_name); 
Identificativo
Descrizione
session
L'oggetto Session che rappresenta la sessione di accesso al database corrente.
entitydef_name
Una stringa che contiene il nome dell'oggetto EntityDef.
Valore di ritorno
L'oggetto EntityDef richiesto.

Esempi

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");

} 

Feedback