JavaScript global method: print

Displays a message in the client Messages view and prints it in the Service Manager log file.

Note Messages only print to the Service Manager log file when JavaScript is running in the background.

Syntax

print( output );

Arguments

The following arguments are valid for this function:

Argument Data type Required Description
output String Yes This argument contains the text string or variable value you want the script to print to the Message View and the sm.log file. You must enclose literal text strings in quotation marks.

Return values

None

Throws

None

Description

This method displays the contents of the method argument in the Messages view and also prints it in the Service Manager log file.

Example

This example does the following:

  • Creates a variable with a string value
  • Displays the contents of the variable

This example requires the following sample data:

  • A text string
var example = "abc123";
print("The value of example is: " + example);