Page extension 6100 E-Doc. Purchase Invoices
src/Apps/W1/EDocument/App/src/Extensions/EDocPurchaseInvoices.PageExt.al38 lines, Copyright (c) Microsoft Corporation. MIT
// ------------------------------------------------------------------------------------------------// Copyright (c) Microsoft Corporation. All rights reserved.// Licensed under the MIT License. See License.txt in the project root for license information.// ------------------------------------------------------------------------------------------------namespace Microsoft.Purchases.Document;using Microsoft.eServices.EDocument;pageextension 6100 "E-Doc. Purchase Invoices" extends "Purchase Invoices"{ layout { addbefore(IncomingDocAttachFactBox) { part(EDocumentPdfPreview; "Inbound E-Doc. Picture") { ApplicationArea = Basic, Suite; Caption = 'Preview'; Visible = ShowEDocumentPdfPreview; ShowFilter = false; } } } trigger OnAfterGetCurrRecord() var EDocumentHelper: Codeunit "E-Document Helper"; EDocDataStorageEntryNo: Integer; begin EDocDataStorageEntryNo := EDocumentHelper.GetInboundPdfPreviewEntryNo(Rec.RecordId(), Rec."E-Document Link"); ShowEDocumentPdfPreview := EDocDataStorageEntryNo <> 0; CurrPage.EDocumentPdfPreview.Page.SetRecFilterByEDocDataStorageEntryNo(EDocDataStorageEntryNo); end; var ShowEDocumentPdfPreview: Boolean;}