TypeEvénement

Description

Returns the type of event that caused the hook invocation. Il s'agit d'une propriété en lecture seule ; elle peut être visualisée mais pas définie.

Syntaxe

VBScript

eventObject.EventType 

Perl

$eventObject->EventType(); 
Identificateur
Description
eventObject
An instance of EventObject.
Valeur de retour
A Long whose value is one of the EventType enumerated constants.

Exemples

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

      } 

} 

Feedback