Page 9210 Accessible Companies in 25

App
System Application
Namespace
System.Environment.Configuration
Source table
2000000006

Procedures, 1

Versions171819202122232425262728latest

Source242526272829

Source in 25

src/System Application/App/User Settings/src/AccessibleCompanies.Page.al85 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.Environment.Configuration;

using System.Environment;

/// <summary>
/// List page that contains the allowed companies for the current user.
/// </summary>
page 9210 "Accessible Companies"
{
    Caption = 'Allowed Companies';
    Editable = false;
    PageType = List;
    SourceTable = Company;
    SourceTableTemporary = true;
    Permissions = tabledata Company = r;

    layout
    {
        area(Content)
        {
            repeater(Group)
            {
                field(CompanyDisplayName; Rec."Display Name")
                {
                    ApplicationArea = All;
                    Caption = 'Name';
                    ToolTip = 'Specifies the display name that is defined for the company. If a display name is not defined, then the company name is used.';
                }
                field("Evaluation Company"; Rec."Evaluation Company")
                {
                    ApplicationArea = All;
                    Caption = 'Evaluation Company';
                    Editable = false;
                    ToolTip = 'Specifies that the company is for trial purposes only, and that a subscription has not been purchased.';
                }
            }
        }
    }

    actions
    {
        area(Processing)
        {
            action("Create New Company")
            {
                AccessByPermission = tabledata Company = I;
                ApplicationArea = Basic, Suite;
                Caption = 'Create New Company';
                Image = Company;
                Promoted = true;
                PromotedCategory = New;
                PromotedIsBig = true;
                PromotedOnly = true;
                ToolTip = 'Get assistance with creating a new company.';
                Visible = SoftwareAsAService;

                trigger OnAction()
                begin
                    // Action invoked through event subscriber to avoid hard coupling to other objects,
                    // as this page is part of the Cloud Manager.
                    Initialize();
                end;
            }
        }
    }

    procedure Initialize()
    var
        UserSettingsImpl: Codeunit "User Settings Impl.";
        EnvironmentInformation: Codeunit "Environment Information";
    begin
        SoftwareAsAService := EnvironmentInformation.IsSaaS();
        UserSettingsImpl.GetAllowedCompaniesForCurrentUser(Rec);
    end;

    var
        SoftwareAsAService: Boolean;
}

Procedures, 1

NameParametersReturnsAccessObsolete
Initialize()public-