Codeunit wDCR_LayoutFileManagement
Provides all implementation related to the flow of Document Creator layouts (e.g., create, copy, import, export, archive, upgrade).
Properties
Methods
wgFncCopyReportLayout
Copy a 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 "Report Layout List" |
pRecSelectedReportLayoutList |
The 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. |
Returns
Type |
Description |
Boolean |
true iff the layout was created. |
wgFncCopyReportLayout
Copy a report layout to a new tenant report layout record with specified report ID, layout name and description.
Parameters
Type |
Name |
Description |
Record "Report Layout List" |
pRecSelectedReportLayoutList |
The 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 layout description for the new report layout. |
wgFncCreateNewBlankDocumentCreatorTenantReportLayout
Opens a dialog page that allows the user to create a new, blank Document Creator tenant report layout for the specified report object.
Parameters
Type |
Name |
Description |
Integer |
pReportID |
The ID of the report object to create a new Document Creator tenant report layout for. |
Integer |
vReturnReportID |
The ID of the selected target report object selected in the dialog. |
Text[250] |
vReturnLayoutName |
The name of the new tenant report layout. |
Returns
Type |
Description |
Boolean |
true iff a layout was created. |
wgFncCreateNewBlankDocumentCreatorTenantReportLayout
Creates a new, blank Document Creator tenant report layout for the specified report object with specified layout name and layout description.
Parameters
Type |
Name |
Description |
Integer |
pReportID |
The ID of the target report object. |
Text[250] |
pLayoutName |
The name of the new tenant report layout. |
Text[250] |
pLayoutDescription |
The description of the new tenant report layout. |
Returns
Type |
Description |
Boolean |
true iff a new layout was created. |
wgFncGenerateUniqueTenantReportLayoutName
Generates a unique/unreserved name for a new tenant report layout.
Parameters
Type |
Name |
Description |
Integer |
pReportID |
The ID of the report to which the layout applies. |
Text[250] |
pInitialLayoutName |
The name to base the new name on. |
wgFncGetDocumentCreatorDefaultLayoutFileName
Returns the default file name for a layout file.
Parameters
Type |
Name |
Description |
Record "Report Layout List" |
pRecReportLayoutList |
The report layout. |
Returns
Type |
Description |
Text |
The file name. |
wgFncGetDocumentCreatorLayoutFileExtension
Returns the file extension for Document Creator Layout files.
Returns
Type |
Description |
Text[4] |
Document Creator Layout file extension. |
wgFncGetDocumentCreatorLayoutFileFilter
Returns the file filter for Document Creator Layout files.
Returns
Type |
Description |
Text |
Document Creator Layout file filter. |
wgFncGetDocumentCreatorReportLayoutMimeType
Gets the MIME Type for Document Creator report layouts.
Returns
Type |
Description |
Text[255] |
The MIME Type for Document Creator Report Layouts as Text. |
wgFncGetDocumentCreatorReportLayoutSelection
Gets the Document Creator report layout selection if it is set up for the current company.
Parameters
Type |
Name |
Description |
Integer |
pReportID |
The ID of the report object. |
Record "Report Layout List" |
vRecReportLayoutList |
The Report Layout. |
Returns
Type |
Description |
Boolean |
true iff the report has a Document Creator report layout selection. |
wgFncHasDocumentCreatorReportLayoutSelection
Returns whether the report with the specified ID has a Document Creator report layout selection.
Parameters
Type |
Name |
Description |
Integer |
pReportID |
The ID of the report object. |
Returns
Type |
Description |
Boolean |
true iff the report has a Document Creator report layout selection. |
Imports the layout to the Report Layout List record and archives the previous version.
Parameters
Type |
Name |
Description |
Record "Report Layout List" |
pRecReportLayoutList |
The Report Layout List record. |
Text[255] |
pMimeType |
The MIME type of the layout to import. |
InStream |
pInStreamLayout |
The layout to import as an InStream. |
Text[100] |
pComment |
The comment to add to the archived layout. |
Imports the layout to the Tenant Report Layout record and archives the previous version.
Parameters
Type |
Name |
Description |
Record "Tenant Report Layout" |
vRecTenantReportLayout |
The Tenant Report Layout record. |
Text[255] |
pMimeType |
The MIME type of the layout to import. |
InStream |
pInStreamLayout |
The layout to import as an InStream. |
Text[100] |
pComment |
The comment to add to the archived layout. |
wgFncIsDocumentCreatorReportLayout
Returns whether the report layout is a Document Creator report layout.
Parameters
Type |
Name |
Description |
Record "Report Layout List" |
pRecReportLayoutList |
The report layout. |
Returns
Type |
Description |
Boolean |
true iff the report layout is a Document Creator report layout. |
wgFncIsDocumentCreatorReportLayout
Returns whether the report layout is a Document Creator report layout.
Parameters
Type |
Name |
Description |
Record "Tenant Report Layout" |
pRecTenantReportLayout |
The report layout. |
Returns
Type |
Description |
Boolean |
true iff the report layout is a Document Creator report layout. |
wgFncIsDocumentCreatorReportLayout
Returns whether the report layout with specified properties is a Document Creator report layout.
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 Creator report layout. |
wgFncIsDocumentCreatorReportLayout
Returns whether the report layout with specified properties is a Document Creator report layout.
Parameters
Type |
Name |
Description |
ReportLayoutType |
pReportLayoutType |
The report layout type of the layout. |
Text[255] |
pMimeType |
The MIME Type of the layout. |
Returns
Type |
Description |
Boolean |
true iff the report layout is a Document Creator report layout. |
wgFncIsDocumentCreatorReportLayoutMimeType
Returns whether the specified MIME Type corresponds to a Document Creator report layout.
Parameters
Type |
Name |
Description |
Text |
pMimeType |
The MIME Type |
Returns
Type |
Description |
Boolean |
true iff the MIME Type corresponds to a Document Creator report layout. |
wgFncPreviewEmailBody
Render an email body using the selected layout and view it in the Dynamics 365 Business Central email editor. The procedure will open the request page of the report so that you can select for which data (e.g., a specific invoice) to generate the HTML email body.
Parameters
Type |
Name |
Description |
Record "Report Layout List" |
pRecReportLayoutList |
The report layout |
Returns
Type |
Description |
Boolean |
true iff the email body was generated successfully. |
wgFncSetDocumentCreatorReportLayoutFilter
Applies filters to the passed "Report Layout List" record to filter on Document Creator report layouts.
Parameters
Type |
Name |
Description |
Record "Report Layout List" |
vRecReportLayoutList |
The Record variable to apply the filters to. |
wlEvpOnBeforeGetDocumentCreatorDefaultLayoutFileName
Allows to hook into how the default layout file name is determined.
Parameters
Type |
Name |
Description |
Record "Report Layout List" |
pRecReportLayoutList |
The report layout. |
Text |
vDefaultFileName |
The default layout file name. |
Boolean |
vIsHandled |
Set this to true if your extension handles the default layout file name for this report layout. |