Skip to content

Codeunit wDCR_LayoutArchiveMgt

A codeunit with functions related to the report layout archive.

Properties

Name Value
Access Public

Methods

wgFncArchive(Report Layout List, Text[100]):Boolean

Creates an archive version for a Report Layout List record.

Parameters

Type Name Description
Record "Report Layout List" pRecReportLayoutList The Report Layout List record to archive.
Text[100] pComment The archive comment to add to the archive record.

wgFncArchive(Tenant Report Layout@, Text[100]):Boolean

Creates an archive version for a Tenant Report Layout record.

Parameters

Type Name Description
Record "Tenant Report Layout" vRecTenantReportLayout The Tenant Report Layout record to archive.
Text[100] pComment The archive comment to add to the archive record.

wgFncEditComment(wDCR_TenantReportLayoutArchive@):Boolean

Opens the <see cref="wDCR_EditLayoutArchiveComment" /> dialog page to edit the comment of a Tenant Report Layout Archive record.

Parameters

Type Name Description
Record "wDCR_TenantReportLayoutArchive" vRecwDCR_TenantReportLayoutArchive The record to open the dialog page with.

Returns

Type Description
Boolean true iff the user confirmed to edit the comment.

wgFncEditComment(wDCR_TenantReportLayoutArchive@, Boolean):Boolean

Opens the <see cref="wDCR_EditLayoutArchiveComment" /> dialog page to edit the comment of a Tenant Report Layout Archive record.

Parameters

Type Name Description
Record "wDCR_TenantReportLayoutArchive" vRecwDCR_TenantReportLayoutArchive The record to open the dialog page with.
Boolean pModify Specifies whether to modify the record after editing the comment.

Returns

Type Description
Boolean true iff the user confirmed to edit the comment.

wgFncExportLayout(wDCR_TenantReportLayoutArchive@):Text

Exports an archived layout file, prompting the user for a location to save the file.

Parameters

Type Name Description
`` vRecwDCR_CustomReportLayoutArchive The Custom Report Layout Archive record.

Returns

Type Description
`` Layout file name.

wgFncExportLayout(wDCR_TenantReportLayoutArchive@, OutStream@):Boolean

Gets the contents of an archived layout file and writes them to the passed TempBlob.

Parameters

Type Name Description
Record "wDCR_TenantReportLayoutArchive" vRecwDCR_TenantReportLayoutArchive The Tenant Report Layout Archive record.
OutStream vOutStreamLayout The OutStream to write the layout to.

Returns

Type Description
Boolean true iff the record contains a layout and was written to the OutStream.

wgFncIsDocumentCreatorReportLayout(wDCR_TenantReportLayoutArchive):Boolean

Checks if an archived tenant report layout is a Document Creator layout.

Parameters

Type Name Description
Record "wDCR_TenantReportLayoutArchive" pRecwDCR_TenantReportLayoutArchive The archived tenant report layout.

Returns

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

wgFncRemoveArchiveVersions(Tenant Report Layout, Boolean)

Removes all versions of a tenant report layout from the archive.

Parameters

Type Name Description
Record "Tenant Report Layout" pRecTenantReportLayout The tenat report layout
Boolean pRunTrigger Whether to run the OnDelete trigger.

wgFncRestoreLayout(wDCR_TenantReportLayoutArchive@)

Restores an archived layout to a Custom Report Layout record.

Parameters

Type Name Description
Record "wDCR_TenantReportLayoutArchive" vRecwDCR_TenantReportLayoutArchive The Tenant Report Layout Archive record.

wlEvpOnBeforeArchive(Tenant Report Layout@, Text[100])

Allows to hook into archiving a tenant report layout.

Parameters

Type Name Description
Record "Tenant Report Layout" vRecTenantReportLayout The tenant report layout to archive.
Text[100] pComment The comment text to add to the new archive entry.

wlEvpOnBeforeGetDefaultArchivedLayoutFileName(wDCR_TenantReportLayoutArchive@, Text@, Boolean@)

Allows to edit the default archive layout file name for an archive entry when it is exported.

Parameters

Type Name Description
Record "wDCR_TenantReportLayoutArchive" vRecwDCR_TenantReportLayoutArchive The tenant report layout archive record.
Text vDefaultFileName The default layout file name for when the layout archive record is exported.
Boolean vIsHandled Set this parameter to true if your extension handles getting a default layout file name for the archive record.