Page 9349 Sales Order Archives

Base Application, Microsoft.Sales.Archive

src/Layers/W1/BaseApp/Sales/Archive/SalesOrderArchives.Page.al263 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.Sales.Archive;using Microsoft.EServices.EDocument;using Microsoft.Finance.Dimension;using System.Security.User;/// <summary>/// Lists all archived sales order versions for viewing and restoration./// </summary>page 9349 "Sales Order Archives"{    ApplicationArea = Basic, Suite;    Caption = 'Sales Order Archives';    CardPageID = "Sales Order Archive";    Editable = false;    PageType = List;    AboutTitle = 'About Sales Order Archives';    AboutText = 'View and manage archived versions of sales orders, including details about customers, dates, and amounts, with options to restore or copy archived orders for reuse.';    SourceTable = "Sales Header Archive";    SourceTableView = where("Document Type" = const(Order));    UsageCategory = History;    layout    {        area(content)        {            repeater(Control1)            {                ShowCaption = false;                field("No."; Rec."No.")                {                    ApplicationArea = All;                }                field("Version No."; Rec."Version No.")                {                    ApplicationArea = Suite;                }                field("Date Archived"; Rec."Date Archived")                {                    ApplicationArea = Suite;                }                field("Time Archived"; Rec."Time Archived")                {                    ApplicationArea = Suite;                }                field("Archived By"; Rec."Archived By")                {                    ApplicationArea = Suite;                    trigger OnDrillDown()                    var                        UserMgt: Codeunit "User Management";                    begin                        UserMgt.DisplayUserInformation(Rec."Archived By");                    end;                }                field("Interaction Exist"; Rec."Interaction Exist")                {                    ApplicationArea = RelationshipMgmt;                }                field("Sell-to Customer No."; Rec."Sell-to Customer No.")                {                    ApplicationArea = Suite;                }                field("Sell-to Customer Name"; Rec."Sell-to Customer Name")                {                    ApplicationArea = Suite;                }                field("External Document No."; Rec."External Document No.")                {                    ApplicationArea = Suite;                }                field("Sell-to Contact"; Rec."Sell-to Contact")                {                    ApplicationArea = Suite;                }                field("Sell-to Post Code"; Rec."Sell-to Post Code")                {                    ApplicationArea = Suite;                }                field("Sell-to Country/Region Code"; Rec."Sell-to Country/Region Code")                {                    ApplicationArea = Suite;                }                field("Bill-to Contact No."; Rec."Bill-to Contact No.")                {                    ApplicationArea = Suite;                }                field("Bill-to Post Code"; Rec."Bill-to Post Code")                {                    ApplicationArea = Suite;                }                field("Bill-to Country/Region Code"; Rec."Bill-to Country/Region Code")                {                    ApplicationArea = Suite;                }                field("Ship-to Code"; Rec."Ship-to Code")                {                    ApplicationArea = Suite;                }                field("Ship-to Name"; Rec."Ship-to Name")                {                    ApplicationArea = Suite;                }                field("Ship-to Contact"; Rec."Ship-to Contact")                {                    ApplicationArea = Suite;                }                field("Ship-to Post Code"; Rec."Ship-to Post Code")                {                    ApplicationArea = Suite;                }                field("Ship-to Country/Region Code"; Rec."Ship-to Country/Region Code")                {                    ApplicationArea = Suite;                }                field("Posting Date"; Rec."Posting Date")                {                    ApplicationArea = Suite;                }                field("Shortcut Dimension 1 Code"; Rec."Shortcut Dimension 1 Code")                {                    ApplicationArea = Dimensions;                }                field("Shortcut Dimension 2 Code"; Rec."Shortcut Dimension 2 Code")                {                    ApplicationArea = Dimensions;                }                field("Location Code"; Rec."Location Code")                {                    ApplicationArea = Location;                }                field("Salesperson Code"; Rec."Salesperson Code")                {                    ApplicationArea = Suite;                }                field("Currency Code"; Rec."Currency Code")                {                    ApplicationArea = Suite;                }                field("Document Date"; Rec."Document Date")                {                    ApplicationArea = Suite;                    Visible = false;                }                field("Requested Delivery Date"; Rec."Requested Delivery Date")                {                    ApplicationArea = Suite;                    Visible = false;                }                field("Payment Terms Code"; Rec."Payment Terms Code")                {                    ApplicationArea = Suite;                    Visible = false;                }                field("Due Date"; Rec."Due Date")                {                    ApplicationArea = Suite;                    Visible = false;                }                field("Payment Discount %"; Rec."Payment Discount %")                {                    ApplicationArea = Suite;                    Visible = false;                }                field("Shipment Method Code"; Rec."Shipment Method Code")                {                    ApplicationArea = Suite;                    Visible = false;                }                field("Shipment Date"; Rec."Shipment Date")                {                    ApplicationArea = Suite;                    Visible = false;                }            }        }        area(factboxes)        {            part(IncomingDocAttachFactBox; "Incoming Doc. Attach. FactBox")            {                ApplicationArea = Basic, Suite;                ShowFilter = false;                Visible = false;            }            systempart(Control1900383207; Links)            {                ApplicationArea = RecordLinks;                Visible = false;            }            systempart(Control1905767507; Notes)            {                ApplicationArea = Notes;                Visible = false;            }        }    }    actions    {        area(navigation)        {            group("Ver&sion")            {                Caption = 'Ver&sion';                Image = Versions;                action(Dimensions)                {                    AccessByPermission = TableData Dimension = R;                    ApplicationArea = Dimensions;                    Caption = 'Dimensions';                    Image = Dimensions;                    ShortCutKey = 'Alt+D';                    ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to sales and purchase documents to distribute costs and analyze transaction history.';                    trigger OnAction()                    begin                        Rec.ShowDimensions();                    end;                }                action("Co&mments")                {                    ApplicationArea = Comments;                    Caption = 'Co&mments';                    Image = ViewComments;                    RunObject = Page "Sales Archive Comment Sheet";                    RunPageLink = "Document Type" = field("Document Type"),                                  "No." = field("No."),                                  "Document Line No." = const(0),                                  "Doc. No. Occurrence" = field("Doc. No. Occurrence"),                                  "Version No." = field("Version No.");                    ToolTip = 'View or add comments for the record.';                }            }        }        area(Promoted)        {            group(Category_Process)            {                Caption = 'Process';                actionref(Dimensions_Promoted; Dimensions)                {                }            }        }    }    trigger OnOpenPage()    begin        Rec.SetSecurityFilterOnRespCenter();    end;    trigger OnAfterGetCurrRecord()    begin        CurrPage.IncomingDocAttachFactBox.Page.LoadDataFromRecord(Rec);    end;}