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 Rational® ClearQuest® Designer. They cannot be set directly from the API.

Syntax

VBScript

entitydef.GetActionDefType action_def_name 

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

VBScript

set sessionObj  = GetSession
set entityDefObj = sessionObj.GetEntityDef(GetEntityDefName())

sessionObj.OutputDebugString "Modify action names for " & _
         entityDefObj.GetName()

' List the action names whose type is "modify"
nameList = entityDefObj.GetActionDefNames()
For Each actionName in nameList
   actionType = entityDefObj.GetActionDefType(actionName)
   if actionType = AD_MODIFY Then
      sessionObj.OutputDebugString actionName
   End If
Next 

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