GetType

Description

Returns the type (state-based or stateless) of the Entity.

You cannot change the type of an Entity object using the API. The type of a record is determined by the corresponding record type and must be set by the administrator using HCL Compass Designer.

Syntax

VBScript


entity.GetType 

Perl


$entity->GetType(); 
Identifier
Description
entity
An Entity object representing a user data record. Inside a hook, if you omit this part of the syntax, the Entity object corresponding to the current data record is assumed (VBScript only).
Return value
A Long whose value is an EntityType constants: REQ_ENTITY for a state-based Entity object or AUX_ENTITY for a stateless Entity object.

Examples

VBScript


recordType = GetType 
If recordType = AD_REQ_ENTITY Then 
   OutputDebugString "This record is a state-based record." 
Else 
   OutputDebugString "This record is a stateless record." 
End If 

Perl


$recordtype = $entity->GetType();



if ($recordtype eq $CQPerlExt::CQ_REQ_ENTITY)

 {

 $session->OutputDebugString("This record is a state-based
       record.");

 }

else

 {

 $session->OutputDebugString("This record is a stateless record.");

 }