Page extension 99000759 Mfg. Cost Adjustment Overview

App
Base Application
Namespace
Microsoft.Inventory.Costing
Versions
27-28
Extends
Cost Adjustment Overview

Versions171819202122232425262728

Source29

Source in 29

src/Layers/W1/BaseApp/Manufacturing/Inventory/Costing/MfgCostAdjustmentOverview.PageExt.al61 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.Inventory.Costing;

using Microsoft.Inventory.Item;

pageextension 99000759 "Mfg. Cost Adjustment Overview" extends "Cost Adjustment Overview"
{
    actions
    {
        addafter("Import Item Data")
        {
            action("Mfg. Export Item Data")
            {
                ApplicationArea = Manufacturing;
                Caption = 'Export item data';
                ToolTip = 'Use this function to export item related data to text file (you can attach this file to support requests in case you may have issues with costing calculation).';
                Image = Export;

                trigger OnAction()
                var
                    Item: Record Item;
                begin
                    Item.SetRange("No.", Rec."No.");
                    Xmlport.Run(XmlPort::"Mfg. Export Item Data", false, false, Item);
                end;
            }
            action("Mfg. Import Item Data")
            {
                ApplicationArea = Manufacturing;
                Caption = 'Import item data';
                ToolTip = 'Use this function to import item related data from text file.';
                Image = Import;
                Visible = SandboxActionsVisible;

                trigger OnAction()
                begin
                    if not SandboxActionsVisible then
                        Error(GetNotTestEnvironmentErr());
                    Xmlport.Run(XmlPort::"Mfg. Export Item Data", false, true);
                end;
            }
        }
        addlast("Diagnostics_Promoted")
        {
            actionref("Mfg. Export Item Data_Promoted"; "Mfg. Export Item Data") { }
            actionref("Mfg. Import Item Data_Promoted"; "Mfg. Import Item Data") { }
        }
    }

    var
        SandboxActionsVisible: Boolean;

    trigger OnOpenPage()
    begin
        SandboxActionsVisible := IsSandboxActionsVisible();
    end;
}