Codeunit WSB_DMTTemplateSupportFileMgt
Provides all implementation related to the Document Mail Templates Support File (.dmts) archive. A support bundles a mail template with a report dataset (and settings), so that another tenant that does not have the source report object can still open it in the Mail Template Support File Analysis page and preview the rendered email body.
Properties
Methods
wgFncExportSupportEntry
Exports one of the entries from a Document Mail Templates Support File to a file selected via a file dialog.
Parameters
| Type |
Name |
Description |
Codeunit "Temp Blob" |
pCduTempBlobSupport |
The support. |
Enum "WSB_DMTSupportFileEntryType" |
pEntryType |
The type of entry to export. |
wgFncExportSupportEntry
Exports one of the entries from a Document Mail Templates Support File to a Temp Blob.
Parameters
| Type |
Name |
Description |
Codeunit "Temp Blob" |
pCduTempBlobSupport |
The support. |
Enum "WSB_DMTSupportFileEntryType" |
pEntryType |
The type of entry to export. |
Codeunit "Temp Blob" |
vCduTempBlobEntry |
The Temp Blob that will contain the entry. |
wgFncExportSupportFile
Creates a Document Mail Templates Support File for a mail template and prompts the user to save it as a file. If <paramref name="pIncludeDataset" /> is true, the report's request page is opened to generate a dataset that is included in the support.
Parameters
| Type |
Name |
Description |
Record "Report Layout List" |
pRecReportLayoutList |
The mail template layout record. |
Boolean |
pIncludeDataset |
Specifies whether a dataset should be included in the support. |
wgFncExportSupportFile
Creates a Document Mail Templates Support File for a mail template and stores it in a Temp Blob.
Parameters
| Type |
Name |
Description |
Record "Report Layout List" |
pRecReportLayoutList |
The mail template layout record. |
Boolean |
pIncludeDataset |
Specifies whether a dataset should be included in the support. |
Codeunit "Temp Blob" |
vCduTempBlobSupport |
The Temp Blob that will contain the resulting support. |
Returns
| Type |
Description |
Boolean |
true iff the support was created successfully. |
wgFncGetSchemaContentFromSupport
Returns the schema metadata used to decode binary columns in a support file's dataset.
Parameters
| Type |
Name |
Description |
Codeunit "Temp Blob" |
pCduTempBlobSupport |
The support file. |
Returns
| Type |
Description |
Text |
The Word XML part, or an empty string if the archive has no schema. |
wgFncGetStreamFromSupport
Reads an entry from a Document Mail Templates Support File.
Parameters
| Type |
Name |
Description |
Codeunit "Temp Blob" |
pCduTempBlobSupport |
The support. |
Enum "WSB_DMTSupportFileEntryType" |
pEntryType |
The type of entry to read. |
OutStream |
vOutStream |
The OutStream to which the entry content is written. |
wgFncGetSupportFileExtension
Returns the file extension for Document Mail Templates Support File files.
Returns
| Type |
Description |
Text[5] |
The Document Mail Templates Support File file extension. |
wgFncGetSupportFileExtFilter
Returns the file extension filter for Document Mail Templates Support File files.
Returns
| Type |
Description |
Text |
The Document Mail Templates Support File file extension filter. |
wgFncGetSupportFileFilter
Returns the file filter for Document Mail Templates Support File files.
Returns
| Type |
Description |
Text |
The Document Mail Templates Support File file filter. |
wgFncGetSupportSettings
Gets the support file settings as a JSON object from a Document Mail Templates Support File.
Parameters
| Type |
Name |
Description |
Codeunit "Temp Blob" |
pCduTempBlobSupport |
The Temp Blob containing the support. |
JsonObject |
vJsonSettings |
The settings as a JSON object. |
Returns
| Type |
Description |
Boolean |
true iff the settings could be retrieved successfully. |
wgFncGetSupportSettings
Gets the support file settings as a JSON object from a Document Mail Templates Support File.
Parameters
| Type |
Name |
Description |
InStream |
pInStreamSupport |
The InStream containing the support. |
JsonObject |
vJsonSettings |
The settings as a JSON object. |
Returns
| Type |
Description |
Boolean |
true iff the settings could be retrieved successfully. |
wgFncGetTemplateContentFromSupport
Returns the full contents of the mail template stored in a Document Mail Templates Support File.
Parameters
| Type |
Name |
Description |
Codeunit "Temp Blob" |
pCduTempBlobSupport |
The support. |
Returns
| Type |
Description |
Text |
The mail template file contents. |
wgFncRebuildSupportWithTemplate
Rebuilds a Document Mail Templates Support File with new template content, preserving the dataset, schema and settings.
Parameters
| Type |
Name |
Description |
Codeunit "Temp Blob" |
vCduTempBlobSupport |
The Temp Blob containing the support. Its contents are replaced with the rebuilt support. |
Text |
pTemplateContent |
The new mail template content to store in the support. |