Page 8702 Company Size Cache Part

App
System Application
Namespace
System.DataAdministration
Versions
18-28
Source table
8701

Versions171819202122232425262728

Source242526272829

Source in 29

src/System Application/App/Table Information/src/CompanySizeCachePart.Page.al65 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 System.DataAdministration;

/// <summary>
/// The Company Size Cache Part page shows information about company sizes.
/// </summary>
page 8702 "Company Size Cache Part"
{
    Caption = 'Companies';
    PageType = CardPart;
    RefreshOnActivate = true;
    Editable = false;
    SourceTable = "Company Size Cache";
    SourceTableView = sorting("Size (KB)") order(descending);
    InsertAllowed = false;
    ModifyAllowed = false;
    DeleteAllowed = false;
    Permissions = tabledata "Company Size Cache" = r;

    layout
    {
        area(Content)
        {
            repeater(general)
            {
                field(CompanyName; Rec."Company Name")
                {
                    ApplicationArea = All;
                    ToolTip = 'Specifies the name of the company.';
                }
                field(SizeKB; Rec."Size (KB)")
                {
                    ApplicationArea = All;
                    ToolTip = 'Specifies how much space the company occupies in the database (in kilobytes)';
                }
            }
            group(Total)
            {
                ShowCaption = false;
                field(TotalSize; TotalSizeKB)
                {
                    ApplicationArea = All;
                    Caption = 'Total (KB)';
                    ToolTip = 'Specifies how much space all companies occupy in the database (in kilobytes)';
                }
            }
        }
    }

    var
        TotalSizeKB: Integer;

    trigger OnAfterGetCurrRecord()
    var
        TableInformationCacheImpl: Codeunit "Table Information Cache Impl.";
    begin
        TotalSizeKB := TableInformationCacheImpl.CalcCompaniesTotalSize();
    end;
}