Page 1356 Posted Service Inv. - Update

Base Application, Microsoft.Service.History

src/Layers/W1/BaseApp/Service/History/PostedServiceInvUpdate.Page.al109 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.Service.History;page 1356 "Posted Service Inv. - Update"{    Caption = 'Posted Service Inv. - Update';    DeleteAllowed = false;    Editable = true;    InsertAllowed = false;    ModifyAllowed = true;    PageType = Card;    ShowFilter = false;    SourceTable = "Service Invoice Header";    SourceTableTemporary = true;    layout    {        area(content)        {            group(General)            {                Caption = 'General';                field("No."; Rec."No.")                {                    ApplicationArea = Service;                    Editable = false;                    ToolTip = 'Specifies the number of the posted invoice.';                }                field("Bill-to Name"; Rec."Bill-to Name")                {                    ApplicationArea = Service;                    Caption = 'Customer';                    Editable = false;                    ToolTip = 'Specifies the name of the customer on the service invoice.';                }                field("Posting Date"; Rec."Posting Date")                {                    ApplicationArea = Service;                    Editable = false;                    ToolTip = 'Specifies the posting date for the document.';                }            }            group(Payment)            {                Caption = 'Payment';                field("Payment Method Code"; Rec."Payment Method Code")                {                    ApplicationArea = Basic, Suite;                    Caption = 'Payment Method Code';                }                field("Payment Reference"; Rec."Payment Reference")                {                    ApplicationArea = Basic, Suite;                    Caption = 'Payment Reference';                }                field("Company Bank Account Code"; Rec."Company Bank Account Code")                {                    ApplicationArea = Basic, Suite;                    Caption = 'Company Bank Account Code';                }            }        }    }    actions    {    }    trigger OnOpenPage()    begin        xServiceInvoiceHeader := Rec;    end;    trigger OnQueryClosePage(CloseAction: Action): Boolean    begin        if CloseAction = ACTION::LookupOK then            if RecordChanged() then                CODEUNIT.Run(CODEUNIT::"Service Inv. Header - Edit", Rec);    end;    var        xServiceInvoiceHeader: Record "Service Invoice Header";    local procedure RecordChanged() IsChanged: Boolean    begin        IsChanged :=          (Rec."Payment Method Code" <> xServiceInvoiceHeader."Payment Method Code") or          (Rec."Payment Reference" <> xServiceInvoiceHeader."Payment Reference") or          (Rec."Company Bank Account Code" <> xServiceInvoiceHeader."Company Bank Account Code");        OnAfterRecordChanged(Rec, xServiceInvoiceHeader, IsChanged);    end;    procedure SetRec(ServiceInvoiceHeader: Record "Service Invoice Header")    begin        Rec := ServiceInvoiceHeader;        Rec.Insert();    end;    [IntegrationEvent(false, false)]    local procedure OnAfterRecordChanged(var ServiceInvoiceHeader: Record "Service Invoice Header"; xServiceInvoiceHeader: Record "Service Invoice Header"; var IsChanged: Boolean)    begin    end;}