Skip to content

$Templates.Format

Overview

string $Templates.Format ( name, node )

Returns the result of template by specified xml node if found, otherwise returns null.

Arguments

String name Name of template

XmlNode node Xml node to use as input. Can be null.

Remarks

Content of template can be in XSLT or data templates format.

Examples

Basic Usage

var result = $Templates.Format('Purchase Order', $Xml.SelectSingle('Order'))

Sending Email

$Messages.New(targetEmailAddress, 
    $Templates.Subject('Purchase Order'), 
    $Templates.Format('Purchase Order', $Xml.SelectSingle('Order'))
).Send();

See Also