@event::getRecipient

This method retrieves recipient information for the specified target name belonging to the Company associated with the event. You can determine the recipient category (PERSON, DEVICE, or GROUP), using the Recipient script object’s getRecipientCategory method, and then use the methods and variables specific to that type.

Syntax:

@event::getRecipient(String targetName)

Parameters:

(String) targetName: target name of the recipient

Returns:

(Script object) @recipient

Example:

In the following example, the getRecipient() method is used in an Event object, followed by a determination of the recipient category. If the recipient type is a Device, the Device’s address is recorded to a log file:

@recipient = @event::getRecipient($event.recipients)

$category = @recipient::getRecipientCategory()

   if($category == "DEVICE")

      @script::log($recipient.address)

   endif