19. One Identity почтовые уведомления

15 июня 2022 г.

18:25

Using scripts in mail templates

For more information about using scripts, see the One Identity Manager Configuration Guide.

In mail templates, any parameters can be used when calling a script.

Syntax

\$SCRIPT(ScriptName, "Options")\$

The Options parameter is optional and is passed as a string. Custom parameters can be coded in any way in this string. Quotes ("") are masked by doubling. In the script, the parameter is passed as the second parameter after the base object. The base object can be either IEntity or ISingleDbObject.

Script example

Public Function CCC_Script(baseEntity as IEntity, options as String) as String

Dim arr = options.Split("|"c)

Dim p1 = arr(0)

Dim p2 = arr(1)

End Function

Example of use in mail templates

\$SCRIPT(CCC_Script, "Param1|Param2")\$

Support for dynamically generated HTML code in mail templates

For detailed information about using dollar (\$) notation, see the One Identity Manager Configuration Guide.

In dollar notation, you can select the HTML type. The HTML code is accepted in scripts and columns but not masked. There is no security check.

Example script with HTML code:

Public Function CCC_HtmlMailText(obj As IEntity) As String

Return "\<h1 style='color:red'>" & obj.Display & "\</h1>"

End Function

Call in mail template:

\$SCRIPT(CCC_HtmlMailText):HTML\$

From \<https://support.oneidentity.com/technical-documents/identity-manager/8.1.3/operational-guide/13#TOPIC-1481199>