Report 482 Update Dim. Set Glbl. Dim. No.

App
Base Application
Namespace
Microsoft.Finance.Dimension
Versions
18-28

Versions171819202122232425262728

Source29

Source in 29

src/Layers/W1/BaseApp/Finance/Dimension/UpdateDimSetGlblDimNo.Report.al50 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.Finance.Dimension;

/// <summary>
/// Report for updating global dimension numbers in dimension set entries.
/// Fixes inconsistent settings between global dimensions and dimension set entry configurations.
/// </summary>
/// <remarks>
/// Processing-only report that delegates to Update Dim. Set Glbl. Dim. No. codeunit for the actual update logic.
/// Used for data maintenance when global dimension configurations become inconsistent with dimension set entries.
/// Can be scheduled to run during non-working hours due to potentially long processing time for large datasets.
/// </remarks>
report 482 "Update Dim. Set Glbl. Dim. No."
{
    Caption = 'Update Global Dimension No. for Dimension Set Entries';
    ApplicationArea = Dimensions;
    UsageCategory = Tasks;
    ProcessingOnly = true;

    requestpage
    {
        layout
        {
            area(Content)
            {
                label(NoteLabel)
                {
                    ApplicationArea = Dimensions;
                    MultiLine = true;
                    ShowCaption = false;
                    CaptionClass = NoteLbl;
                }
            }
        }
    }

    var
        CompletedTxt: Label 'The task was successfully completed.';
        NoteLbl: Label 'Fix inconsistent settings for global and shortcut dimensions. Depending on the number of records, this might take some time. Choose OK to fix the settings now, or Schedule to run the report later, for example, during non-working hours.';

    trigger OnPreReport()
    begin
        Codeunit.Run(Codeunit::"Update Dim. Set Glbl. Dim. No.");
        Message(CompletedTxt);
    end;
}