GetActionDefType

Description

Identifies the type of the specified action.

You can use the GetActionDefNames method to obtain the list of valid values for the action_def_name parameter.

The record type controls what types of actions are permitted for a given record. See the ActionType constants for the complete list.

Like the other parts of an EntityDef object, the administrator sets the defined actions using DevOps Plan Designer. They cannot be set directly from the API.

Syntax

Perl


$entitydef->GetActionDefType(action_def_name); 
Identifier
Description
entitydef
An EntityDef object corresponding to a record type in a schema.
action_def_name
A String that identifies a valid action name of an EntityDef.
Return value
A Long that specifies the type of the action specified in action_def_name.The value corresponds to one of the ActionType constants.

Example

Perl

$sessionobj = $entity->GetSession();

$entitydefname = $entity->GetEntityDefName();

$entitydefobj = $sessionobj->GetEntityDef($entitydefname);

# Search for a legal action with which to modify the record 
$actiondeflist = $entity->GetLegalActionDefNames();

foreach $actionname (@$actiondeflist) 
 {
  $actiondeftype = $entitydefobj->GetActionDefType($actionname);
  if ($actiondedftype eq $CQPerlExt::CQ_MODIFY)
   {
   $sessionobj->EditEntity($entity,$actionname);
   }
 }