@script::generateUUID

Generates a unique ID which can then be associated with a system resource; e.g., an image to embed in an HTML email notification.

Syntax:

@script::generateUUID()

Parameters:

None

Returns:

(string) A unique ID

Example:

The following example illustrates how to use the generateUUID method to generate a unique ID and associate it with a logo that will be added to all HTML email notifications:

$userDir = @script::getSystemProperty("user.dir")
$urlDir = $userDir & "/assets/resources/ui/logo.gif"
$cid = @script::generateUUID()
$content.attachments = "file://"& $urlDir &"|"& $cid