Skip to content

Codeunit wDCR_LayoutFileMgt

Obsolete

Document Creator layouts have been moved to the report layout system tables. Use codeunit wDCR_LayoutFileManagement et al. instead.

Provides all implementation related to the flow of Document Creator custom report layouts (e.g., create, copy, import, export, archive, upgrade).

Properties

Name Value
Access Public
ObsoleteReason Document Creator layouts have been moved to the report layout system tables. Use codeunit wDCR_LayoutFileManagement et al. instead.
ObsoleteState Pending
ObsoleteTag 2.0.0.0

Methods

wgFncArchive(Custom Report Layout@, Text[100])

Creates an archive version for a Custom Report Layout record.

Parameters

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

wgFncConvertAllDocumentCreatorCustomReportLayoutsToTenantReportLayouts(Boolean, Text@):Boolean

Converts all Document Creator custom report layouts generating new tenant report layouts.

Parameters

Type Name Description
Boolean pConvertReportLayoutSelections Whether to update report layout selections accordingly.
Text vErrorMessage The error message for a failed conversion of one of the custom report layout records.

wgFncConvertAllDocumentCreatorCustomReportLayoutsToTenantReportLayoutsWithConfirmation(Boolean, Boolean, Boolean):Boolean

Converts all Document Creator custom report layouts generating new tenant report layouts.

Parameters

Type Name Description
Boolean pConvertReportLayoutSelections Whether to update report layout selections accordingly.
Boolean pMarkUpgraded Whether to modify the descriptions of the custom report layout records to mark them as upgraded.
Boolean pOpenPage Whether to open the Report Layouts page after successful conversion.

wgFncConvertCustomReportLayoutsToTenantReportLayouts(Custom Report Layout@, Boolean, Boolean, Text@):Boolean

Converts all selected custom report layouts generating new tenant report layouts.

Parameters

Type Name Description
Record "Custom Report Layout" vRecCustomReportLayout The Custom Report Layout records to converts.
Boolean pConvertReportLayoutSelections Whether to update report layout selections accordingly.
Boolean pMarkUpgraded Whether to modify the descriptions of the custom report layout records to mark them as upgraded.
Text vErrorMessage The error message for a failed conversion.

Returns

Type Description
Boolean Whether the conversion was successful for all custom report layouts.

wgFncConvertCustomReportLayoutsToTenantReportLayoutsWithConfirmation(Custom Report Layout@, Boolean, Boolean, Boolean)

Converts all selected custom report layouts generating new tenant report layouts. This procedures asks for confirmation and opens the Report Layouts page after successful conversion.

Parameters

Type Name Description
Record "Custom Report Layout" vRecCustomReportLayout The Custom Report Layout records to converts.
Boolean pConvertReportLayoutSelections Whether to update report layout selections accordingly.
Boolean pMarkUpgraded Whether to modify the descriptions of the custom report layout records to mark them as upgraded.
Boolean pOpenPage Whether to open the Report Layouts page after successful conversion.

wgFncConvertReportLayoutSelections(Custom Report Layout, Report Layout List, Boolean):Boolean

Converts the report layout selections that are set to a custom report layout to report layout selections for a report layout list record.

Parameters

Type Name Description
Record "Custom Report Layout" pRecFromCustomReportLayout The custom report layout
Record "Report Layout List" pRecTargetReportLayoutList The report layout list record
Boolean pConfirm Whether the conversion should be confirmed by the user

Returns

Type Description
Boolean true iff the conversion was performed

wgFncCopyReportLayoutAsTenantReportLayout(Custom Report Layout, Integer@, Text[250]@, Text@):Boolean

Copy a custom report layout to a new tenant report layout record. Opens a page where you can enter the report ID and layout name for the new layout.

Parameters

Type Name Description
Record "Custom Report Layout" pRecCustomReportLayout The custom report layout to copy.
Integer vReturnReportID The report ID for the new report layout.
Text[250] vReturnLayoutName The layout name for the new report layout.
Text vErrorMessage The error message for a failed conversion.

Returns

Type Description
Boolean true iff the layout was created.

wgFncCopyReportLayoutAsTenantReportLayout(Custom Report Layout, Text[250]@, Text@):Boolean

Copy a custom report layout to a new tenant report layout record with auto-suggested name.

Parameters

Type Name Description
Record "Custom Report Layout" pRecCustomReportLayout The custom report layout
Text[250] vLayoutName The suggested name.
Text vErrorMessage The error message for a failed conversion.

wgFncCopyReportLayoutAsTenantReportLayout(Custom Report Layout, Integer, Text[250], Text[250], Text@):Boolean

Copy a custom report layout to a new tenant report layout record with specified report ID, layout name and layout description.

Parameters

Type Name Description
Record "Custom Report Layout" pRecCustomReportLayout The custom report layout to copy.
Integer pReportID The report ID for the new report layout.
Text[250] pLayoutName The layout name for the new report layout.
Text[250] pLayoutDescription The description for the new report layout.
Text vErrorMessage The error message for a failed conversion.

Returns

Type Description
Boolean true iff the layout was created.

wgFncExportLayout(wDCR_CustomReportLayoutArchive@):Text

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

Parameters

Type Name Description
Record "wDCR_CustomReportLayoutArchive" vRecwDCR_CustomReportLayoutArchive The Custom Report Layout Archive record.

Returns

Type Description
Text Layout file name.

wgFncExportLayoutToBlob(wDCR_CustomReportLayoutArchive@, Codeunit::System#Utilities#Temp Blob@):Boolean

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

Parameters

Type Name Description
Record "wDCR_CustomReportLayoutArchive" vRecwDCR_CustomReportLayoutArchive The Custom Report Layout Archive record.
Codeunit "Temp Blob" vCduTempBlob The TempBlob to write the layout to.

Returns

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

wgFncGetDefaultLayoutFileName(Custom Report Layout):Text

Gets the default file name for a custom report layout.

Parameters

Type Name Description
Record "Custom Report Layout" pRecCustomReportLayout The custom report layout to get a default file name for.

Returns

Type Description
Text The default file name.

wgFncGetDocumentCreatorLayoutFileExtension:Text[4]

Returns the file extension for Document Creator Layout files.

Returns

Type Description
Text[4] Document Creator Layout file extension.

wgFncGetDocumentCreatorLayoutFileFilter:Text

Returns the file filter for Document Creator Layout files.

Returns

Type Description
Text Document Creator Layout file filter.

wgFncGetLayoutFormatAndMimeType(Custom Report Layout, Option@, Text[255]@)

Gets the corresponding layout format and MIME Type for a custom report layout record.

Parameters

Type Name Description
Record "Custom Report Layout" pRecCustomReportLayout The custom report layout.
Option vLayoutFormat The layout format.
Text[255] vMimeType The MIME type.

wgFncImportLayoutBlobWithArchiveComment(Custom Report Layout@, Codeunit::System#Utilities#Temp Blob@, Text[30], Text[100])

Imports a layout file from a Blob into a Custom Report Layout and creates an archive version of the previous version.

Parameters

Type Name Description
Record "Custom Report Layout" vRecCustomReportLayout The Custom Report Layout record into which the layout should be imported.
Codeunit "Temp Blob" vCduTempBlob The Blob containing the layout to import.
Text[30] pFileExtension The file extension of the layout to import.
Text[100] pArchiveComment The comment to add to the archive version that is created.

wgFncIsDocumentCreatorLayout(Custom Report Layout):Boolean

Returns whether the custom report layout is a Document Creator layout.

Parameters

Type Name Description
Record "Custom Report Layout" pRecCustomReportLayout The Custom Report layout record to check.

Returns

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

wgFncOpenEditCommentDialog(wDCR_CustomReportLayoutArchive@)

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

Parameters

Type Name Description
Record "wDCR_CustomReportLayoutArchive" vRecwDCR_CustomReportLayoutArchive The record to open the dialog page with.

wgFncRestoreLayout(wDCR_CustomReportLayoutArchive@, Custom Report Layout@)

Restores an archived layout to a Custom Report Layout record.

Parameters

Type Name Description
Record "wDCR_CustomReportLayoutArchive" vRecwDCR_CustomReportLayoutArchive The Custom Report Layout Archive record.
Record "Custom Report Layout" vRecCustomReportLayout The Custom Report Layout record to restore the layout to.

wgFncSelectLayoutsForAllCompanies(Custom Report Layout@)

Sets the report layout selection to the custom report layouts for all companies.

Parameters

Type Name Description
Record "Custom Report Layout" vRecCustomReportLayout The set of Custom Report Layout records to use.