Skip to content

Page WSB_DMTAssistPrompt

PromptDialog page to edit the email body of a mail template with Copilot (Mail Template Assist).

Properties

Name Value
ApplicationArea #All
Caption Edit Email Body with Copilot
DataCaptionExpression wgUserPrompt
Extensible False
InherentEntitlements X
IsPreview 1
PageType PromptDialog

Methods

wgFncGetProposedHtml

Gets the email body that Copilot proposed, including any adjustments by the user.

Returns

Type Description
Text The proposed email body.

wgFncSetInput

Sets the email body to edit.

Parameters

Type Name Description
Integer pReportID The report that the mail template is based on.
Text pCurrentHtml The email body that is being edited.
Text pLanguageName The language of the email body, or empty for the default version.

Codeunit WSB_DMTMailTemplateEditor

Exposes procedures that are used for the mail template editor.

Properties

Name Value
Access Public

Methods

wgFncEditMailTemplate

Opens the Document Mail Templates mail template editor to edit the template in the specified user-defined report layout record.

Parameters

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

wgFncEditMailTemplate

Opens the Document Mail Templates mail template editor to edit the template in the specified tenant report layout record.

Parameters

Type Name Description
Record "Tenant Report Layout" vRecTenantReportLayout The tenant report layout record.

wgFncGetColumnPlaceholder

Returns the placeholder for a report column as it should be used in a mail template.

Parameters

Type Name Description
Text pColumnName The name of the column.

Returns

Type Description
Text The placeholder text.

wgFncGetColumnPlaceholder

Returns the placeholder for a report column as it should be used in a mail template.

Parameters

Type Name Description
Text pDataItemXmlName The XML name of the data item that the column belongs to.
Text pColumnName The name of the column.

Returns

Type Description
Text The placeholder text.

wgFncGetIfElseBlockPlaceholder

Returns an {{#if Column}} ... {{else}} ... {{/if}} block to add to a mail template to conditionally show data.

Returns

Type Description
Text The if-else block text.

wgFncGetIfElseBlockPlaceholder

Returns an {{#if Column}} ... {{else}} ... {{/if}} block to add to a mail template to conditionally show data.

Parameters

Type Name Description
Text pColumnName The column name to use as the condition

Returns

Type Description
Text The if-else block text.

wgFncGetIfElseBlockPlaceholder

Returns an {{#if Column}} ... {{else}} ... {{/if}} block to add to a mail template to conditionally show data.

Parameters

Type Name Description
Text pDataItemXmlName The name of the data item to which the column belongs.
Text pColumnName The column name to use as the condition

Returns

Type Description
Text The if-else block text.

wgFncGetLabelPlaceholder

Returns the placeholder for a translatable label as it should be used in a mail template.

Parameters

Type Name Description
Text pTag The tag of the Document Creator translation.

Returns

Type Description
Text The placeholder text.

wgFncGetRepeatBlockPlaceholder

Returns the repeat block for a report data item as it should be used in a mail template.

Parameters

Type Name Description
Text pDataItemXmlName The XML name of the data item to repeat.

Returns

Type Description
Text The repeat block text.

wgFncLookupColumnPlaceholder

Look up a report object column and get a placeholder for it that can be used in a mail template.

Parameters

Type Name Description
Integer pReportID The ID of the report object.

Returns

Type Description
Text A placeholder for the selected report column.

wgFncLookupIfElseConditionColumnPlaceholder

Look up a report object column and uses it as the if-else for it that can be used in a mail template.

Parameters

Type Name Description
Integer pReportID The ID of the report object.

Returns

Type Description
Text A placeholder for the selected report column.

wgFncLookupLabelPlaceholder

Look up a Document Creator Translation and get a placeholder for it that can be used in a mail template.

Returns

Type Description
Text A placeholder for the selected Document Creator translation.

wgFncLookupRepeatBlockPlaceholder

Look up a report dataitem and returns a {{#each ...}} placeholder for it that can be used in a mail template.

Parameters

Type Name Description
Integer pReportID The ID of the report object.

Returns

Type Description
Text A {{#each ...}} placeholder for the selected report dataitem.

wgFncLookupSystemVariable

Look up a report system variable and returns a placeholder for it that can be used in a mail template. The system variables are the leaf nodes of the BCReportInformation section of the report dataset, e.g., ReportRequest.UserName or CompanyMetadata.Name, so that variables added by future Business Central versions are included automatically.

Parameters

Type Name Description
Integer pReportID The ID of the report object.

Returns

Type Description
Text A placeholder for the selected report system variable.

wgFncViewMailTemplate

Opens the Document Mail Templates mail template editor in read-only mode to view the template in the specified report layout record.

Parameters

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

wgFncViewMailTemplate

Opens the Document Mail Templates mail template editor in read-only mode to view the template in the specified report layout record.

Parameters

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