EventType

Description

Returns the type of event that caused the hook invocation. This is a read-only property; it can be viewed but not set.

Syntax

VBScript


eventObject.EventType 

Perl


$eventObject->EventType(); 
Identifier
Description
eventObject
An instance of EventObject.
Return value
A Long whose value is one of the EventType enumerated constants.

Examples

VBScript


Dim eventType

eventType = param.EventType

if eventType = AD_BUTTON_CLICK Then

    SetFieldValue "KeyCustomer", "Company A"

elseif eventType = AD_CONTEXMENU_ITEM_SELECTION Then

    SetFieldValue "KeyCustomer", "Company B"

end if 

Perl


my $eventType;

$eventType = $param->EventType();

if ($eventType == $CQPerlExt::CQ_BUTTON_CLICK) {

  $entity->SetFieldValue("KeyCustomer", "Company A");

} else {

           if ($eventType == $CQPerlExt::CQ_CONTEXMENU_ITEM_SELECTION) {

          $entity->SetFieldValue("KeyCustomer", "Company B");

      } 

}