tableextension 80003 PurchaseHeaderExt extends "Purchase Header" { fields { field(50100; PurchInvoiceImage; Media) { Caption = 'Purchase Invoice Picture'; } } } pageextension 80003 PurchaseInvoiceExt extends "Purchase Invoice" { layout { addbefore(IncomingDocAttachFactBox) { part(PurchaseInvoicePicture; PurchaseInvoicePicture) { ApplicationArea = All; SubPageLink = "Document Type" = field("Document Type"), "No." = field("No."); } } } } page 80003 PurchaseInvoicePicture { Caption = 'Purchase Invoice Picture'; PageType = CardPart; DeleteAllowed = false; InsertAllowed = false; LinksAllowed = false; UsageCategory = Administration; SourceTable = "Purchase Header"; layout { area(Content) { field(PurchInvoiceImage; Rec.PurchInvoiceImage) { ApplicationArea = All; ShowCaption = false; ToolTip = 'Specifies the picture of the purchase invoice.'; } } } actions { area(processing) { action(TakePicture) { ApplicationArea = Basic, Suite; Caption = 'Take'; Image = Camera; ToolTip = 'Activate the camera on the device.'; trigger OnAction() begin Rec.TestField(Rec."No."); Camera.AddPicture(Rec, Rec.FieldNo(PurchInvoiceImage)); end; } action(DeletePicture) { ApplicationArea = Basic, Suite; Caption = 'Delete'; Enabled = DeleteExportEnabled; Image = Delete; ToolTip = 'Delete the record.'; trigger OnAction() begin Rec.TestField(Rec."No."); if not Confirm(DeleteImageQst) then exit; Clear(Rec.PurchInvoiceImage); Rec.Modify(true); end; } } } trigger OnAfterGetCurrRecord() begin SetEditableOnPictureActions; end; var Camera: Codeunit Camera; DeleteImageQst: Label 'Are you sure you want to delete the picture?'; DeleteExportEnabled: Boolean; local procedure SetEditableOnPictureActions() begin DeleteExportEnabled := Rec.PurchInvoiceImage.HasValue; end; }
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Sumit Singh 2,179
OussamaSabbouh 1,999
YUN ZHU 1,892 Super User 2025 Season 2