@event::isAnyRecipientNotifiable

Checks whether the notification can reach any recipients at this time. This method can determine whether any member of a Group or Dynamic Team is notifiable, but does not check against any overrides. This method qualifies each of the specified target names with the Company associated with the event.

Syntax:

@event::isAnyRecipientNotifiable(List names)

Parameters:

Returns:

(@script object) If "recipientNotifiable" is true: notification can reach at least one recipient; otherwise "recipientNotifiable" returns false and an error message is included in a "reason" variable

Example:

@checkRecipient = @event::isAnyRecipientNotifiable($event.recipients)
 IF 
 (!$checkRecipient.recipientNotifiable)
   # log error info.
   # 
   @script::log("None of the Recipients listed were notifiable.") 
   @script::log($checkRecipient.reason)
   
   # perform the external request sending error info. 
   # Note: assumption is that the integration agent has been 
   # configured to handle these requests.
   # 
   @serviceRequest = @event::createExternalServiceRequest2()
   $serviceRequest.request_text = "errorResponse"
   $serviceRequest.errorReason = $checkRecipient.reason
   @serviceRequest::send()
 ENDIF