Skip to content

Codeunit WSB_DMTMailTemplateMgt

Provides all implementation related to Document Mail Templates. A mail template is a report layout of format Custom with MIME type "reportlayout/dmt" that stores rich text (HTML) which is used as the body of an email. When the layout is rendered, the placeholders in the stored HTML are replaced with values from the report dataset. A mail template can hold a separate email body per language, see <see cref="WSB_DMTMailTemplateFile" />.

Properties

Name Value
Access Public

Methods

wgFncGetMailTemplateContent

Returns the contents of a mail template file, which holds the email body for every language.

Parameters

Type Name Description
Record "Report Layout List" pRecReportLayoutList The report layout that holds the mail template.

Returns

Type Description
Text The contents of the mail template file.

wgFncGetMailTemplateContent

Returns the contents of a mail template file, which holds the email body for every language.

Parameters

Type Name Description
Record "Tenant Report Layout" pRecTenantReportLayout The tenant report layout that holds the mail template.

Returns

Type Description
Text The contents of the mail template file.

wgFncGetMailTemplateExtFilter

Returns the file extension filter for Document Mail Template files.

Returns

Type Description
Text Document Mail Template file extension filter.

wgFncGetMailTemplateFileExtension

Returns the file extension for Document Mail Template files.

Returns

Type Description
Text[5] Document Mail Template file extension.

wgFncGetMailTemplateFileFilter

Returns the file filter for Document Mail Template files.

Returns

Type Description
Text Document Mail Template file filter.

wgFncGetMailTemplateMimeType

Gets the MIME type for Document Mail Templates.

Returns

Type Description
Text[255] The MIME type for Document Mail Templates as Text.

wgFncIsMailTemplate

Returns whether the report layout is a Document Mail Template.

Parameters

Type Name Description
Record "Report Layout List" pRecReportLayoutList The report layout.

Returns

Type Description
Boolean true iff the report layout is a Document Mail Template.

wgFncIsMailTemplate

Returns whether the report layout is a Document Mail Template.

Parameters

Type Name Description
Record "Tenant Report Layout" pRecTenantReportLayout The report layout.

Returns

Type Description
Boolean true iff the report layout is a Document Mail Template.

wgFncIsMailTemplate

Returns whether the report layout with the specified properties is a Document Mail Template.

Parameters

Type Name Description
Option pLayoutFormat The Layout Format of the layout.
Text[255] pMimeType The MIME Type of the layout.

Returns

Type Description
Boolean true iff the report layout is a Document Mail Template.

wgFncIsMailTemplateMimeType

Returns whether the specified MIME type corresponds to a Document Mail Template.

Parameters

Type Name Description
Text pMimeType The MIME type.

Returns

Type Description
Boolean true iff the MIME type corresponds to a Document Mail Template.

wgFncSetMailTemplateFilter

Applies filters to the passed "Report Layout List" record to filter on Document Mail Templates.

Parameters

Type Name Description
Record "Report Layout List" vRecReportLayoutList The Record variable to apply the filters to.

wgFncChooseEmailBodyLayout

Offers a one-email layout override after resolving customer or vendor email body selections.

wgFncExportMailTemplateToHTML

Renders and downloads the template as standalone HTML, including embedded images.

wgFncExportMailTemplateToHTML

Renders a report dataset and downloads the resulting standalone HTML.