Page 18 G/L Account List
- App
- Base Application
- Namespace
- Microsoft.Finance.GeneralLedger.Account
- Versions
- 17-28
- Source table
- 15
Versions171819202122232425262728
Source29
Source in 29
src/Layers/W1/BaseApp/Finance/GeneralLedger/Account/GLAccountList.Page.al425 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.GeneralLedger.Account;
using Microsoft.Finance.Analysis;
using Microsoft.Finance.Dimension;
using Microsoft.Finance.GeneralLedger.Ledger;
using Microsoft.Finance.GeneralLedger.Reports;
using Microsoft.Foundation.Comment;
using Microsoft.Foundation.ExtendedText;
using Microsoft.Pricing.Calculation;
using Microsoft.Pricing.PriceList;
using System.Text;
/// <summary>
/// List interface for browsing and selecting general ledger accounts with hierarchical display and balance information.
/// Provides lookup functionality and navigation to detailed account information and related records.
/// </summary>
/// <remarks>
/// Key functionality: Account lookup, balance display, hierarchical navigation, bulk operations.
/// User workflow: Account selection for transactions, account browsing, balance inquiries.
/// Extensible via page extensions for additional columns, actions, and filtering options.
/// </remarks>
page 18 "G/L Account List"
{
ApplicationArea = Basic, Suite;
Caption = 'G/L Account List';
CardPageID = "G/L Account Card";
DataCaptionFields = "Search Name";
Editable = false;
PageType = List;
RefreshOnActivate = true;
SourceTable = "G/L Account";
UsageCategory = ReportsAndAnalysis;
AboutTitle = 'About G/L Account List';
AboutText = 'View general ledger (G/L) accounts and see whether an account belongs to the Income Statement or Balance Sheet, its Account Category, and whether it allows Direct Posting. Use it to validate how accounts participate in general posting setup and to ensure correct posting behavior before transactions are entered. Select an account to open detailed settings, review balances, or navigate to related entries and reports.';
layout
{
area(content)
{
repeater(Control1)
{
IndentationColumn = NameIndent;
IndentationControls = Name;
ShowCaption = false;
field("No."; Rec."No.")
{
ApplicationArea = Basic, Suite;
Style = Strong;
StyleExpr = Emphasize;
}
field(Name; Rec.Name)
{
ApplicationArea = Basic, Suite;
Style = Strong;
StyleExpr = Emphasize;
}
field("Income/Balance"; Rec."Income/Balance")
{
ApplicationArea = Basic, Suite;
}
field("Account Category"; Rec."Account Category")
{
ApplicationArea = Basic, Suite;
}
field("Account Type"; Rec."Account Type")
{
ApplicationArea = Basic, Suite;
}
field("Gen. Posting Type"; Rec."Gen. Posting Type")
{
ApplicationArea = Basic, Suite;
}
field("Gen. Bus. Posting Group"; Rec."Gen. Bus. Posting Group")
{
ApplicationArea = Basic, Suite;
}
field("Gen. Prod. Posting Group"; Rec."Gen. Prod. Posting Group")
{
ApplicationArea = Basic, Suite;
}
field("VAT Bus. Posting Group"; Rec."VAT Bus. Posting Group")
{
ApplicationArea = Basic, Suite;
Visible = false;
}
field("VAT Prod. Posting Group"; Rec."VAT Prod. Posting Group")
{
ApplicationArea = Basic, Suite;
Visible = false;
}
field("Direct Posting"; Rec."Direct Posting")
{
ApplicationArea = Basic, Suite;
}
field("Reconciliation Account"; Rec."Reconciliation Account")
{
ApplicationArea = Basic, Suite;
}
field("Default Deferral Template Code"; Rec."Default Deferral Template Code")
{
ApplicationArea = Suite;
Caption = 'Default Deferral Template';
}
}
}
area(factboxes)
{
part(Control1905532107; "Dimensions FactBox")
{
ApplicationArea = Dimensions;
SubPageLink = "Table ID" = const(15),
"No." = field("No.");
Visible = false;
}
systempart(Control1900383207; Links)
{
ApplicationArea = RecordLinks;
Visible = false;
}
systempart(Control1905767507; Notes)
{
ApplicationArea = Notes;
Visible = false;
}
}
}
actions
{
area(navigation)
{
group("A&ccount")
{
Caption = 'A&ccount';
Image = ChartOfAccounts;
action("Ledger E&ntries")
{
ApplicationArea = Basic, Suite;
Caption = 'Ledger E&ntries';
Image = CustomerLedger;
RunObject = Page "General Ledger Entries";
RunPageLink = "G/L Account No." = field("No.");
RunPageView = sorting("G/L Account No.")
order(descending);
ShortCutKey = 'Ctrl+F7';
ToolTip = 'View the history of transactions that have been posted for the selected record.';
}
action("Co&mments")
{
ApplicationArea = Comments;
Caption = 'Co&mments';
Image = ViewComments;
RunObject = Page "Comment Sheet";
RunPageLink = "Table Name" = const("G/L Account"),
"No." = field("No.");
ToolTip = 'View or add comments for the record.';
}
action(Dimensions)
{
ApplicationArea = Dimensions;
Caption = 'Dimensions';
Image = Dimensions;
RunObject = Page "Default Dimensions";
RunPageLink = "Table ID" = const(15),
"No." = field("No.");
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.';
}
action("E&xtended Texts")
{
ApplicationArea = Suite;
Caption = 'E&xtended Texts';
Image = Text;
RunObject = Page "Extended Text List";
RunPageLink = "Table Name" = const("G/L Account"),
"No." = field("No.");
RunPageView = sorting("Table Name", "No.", "Language Code", "All Language Codes", "Starting Date", "Ending Date");
ToolTip = 'View additional information about a general ledger account, this supplements the Description field.';
}
action("Receivables-Payables")
{
ApplicationArea = Suite;
Caption = 'Receivables-Payables';
Image = ReceivablesPayables;
RunObject = Page "Receivables-Payables";
ToolTip = 'View a summary of the receivables and payables for the account, including customer and vendor balance due amounts.';
}
action("Where-Used List")
{
ApplicationArea = Basic, Suite;
Caption = 'Where-Used List';
Image = Track;
ToolTip = 'View setup tables where a general ledger account is used.';
trigger OnAction()
var
CalcGLAccWhereUsed: Codeunit "Calc. G/L Acc. Where-Used";
begin
CalcGLAccWhereUsed.CheckGLAcc(Rec."No.");
end;
}
}
group("&Balance")
{
Caption = '&Balance';
Image = Balance;
action("G/L &Account Balance")
{
ApplicationArea = Basic, Suite;
Caption = 'G/L &Account Balance';
Image = GLAccountBalance;
RunObject = Page "G/L Account Balance";
RunPageLink = "No." = field("No."),
"Global Dimension 1 Filter" = field("Global Dimension 1 Filter"),
"Global Dimension 2 Filter" = field("Global Dimension 2 Filter"),
"Business Unit Filter" = field("Business Unit Filter");
ToolTip = 'View a summary of the debit and credit balances for different time periods, for the account that you select in the chart of accounts.';
}
action("G/L &Balance")
{
ApplicationArea = Basic, Suite;
Caption = 'G/L &Balance';
Image = GLBalance;
RunObject = Page "G/L Balance";
RunPageOnRec = true;
ToolTip = 'View a summary of the debit and credit balances for all the accounts in the chart of accounts, for the time period that you select.';
}
action("G/L Balance by &Dimension")
{
ApplicationArea = Dimensions;
Caption = 'G/L Balance by &Dimension';
Image = GLBalanceDimension;
RunObject = Page "G/L Balance by Dimension";
ToolTip = 'View a summary of the debit and credit balances by dimensions for the current account.';
}
}
group(Prices)
{
Caption = 'Prices';
Image = JobPrice;
action(SalesPriceLists)
{
ApplicationArea = Basic, Suite;
Caption = 'Sales Prices';
Image = Price;
Visible = ExtendedPriceEnabled;
ToolTip = 'View or edit sales prices for the account.';
trigger OnAction()
var
AmountType: Enum "Price Amount Type";
PriceType: Enum "Price Type";
begin
Rec.ShowPriceListLines(PriceType::Sale, AmountType::Any);
end;
}
action(PurchPriceLists)
{
ApplicationArea = Basic, Suite;
Caption = 'Purchase Prices';
Image = Costs;
Visible = ExtendedPriceEnabled;
ToolTip = 'View or edit purchase prices for the account.';
trigger OnAction()
var
AmountType: Enum "Price Amount Type";
PriceType: Enum "Price Type";
begin
Rec.ShowPriceListLines(PriceType::Purchase, AmountType::Any);
end;
}
}
}
area(reporting)
{
#if not CLEAN28
action("Trial Balance")
{
ApplicationArea = Suite;
Caption = 'Trial Balance (Obsolete)';
Image = "Report";
RunObject = Report "Trial Balance";
ToolTip = 'View general ledger account balances and activities for all the selected accounts, one transaction per line.';
ObsoleteState = Pending;
ObsoleteReason = 'This report has been replaced by the report Trial Balance (Excel). This report will be removed in a future release.';
ObsoleteTag = '28.0';
}
#endif
action("Trial Balance by Period")
{
ApplicationArea = Basic, Suite;
Caption = 'Trial Balance by Period';
Image = "Report";
RunObject = Report "Trial Balance by Period";
ToolTip = 'View general ledger account balances and activities for all the selected accounts, one transaction per line for a selected period.';
}
action("Detail Trial Balance")
{
ApplicationArea = Basic, Suite;
Caption = 'Detail Trial Balance';
Image = "Report";
RunObject = Report "Detail Trial Balance";
ToolTip = 'View detail general ledger account balances and activities for all the selected accounts, one transaction per line.';
}
}
area(Promoted)
{
group(Category_Process)
{
Caption = 'Process', Comment = 'Generated from the PromotedActionCategories property index 1.';
actionref("G/L &Account Balance_Promoted"; "G/L &Account Balance")
{
}
actionref("G/L &Balance_Promoted"; "G/L &Balance")
{
}
actionref("G/L Balance by &Dimension_Promoted"; "G/L Balance by &Dimension")
{
}
}
group(Category_Report)
{
Caption = 'Report', Comment = 'Generated from the PromotedActionCategories property index 2.';
#if not CLEAN28
actionref("Trial Balance_Promoted"; "Trial Balance")
{
ObsoleteState = Pending;
ObsoleteReason = 'This report has been replaced by the report Trial Balance (Excel). This report will be removed in a future release.';
ObsoleteTag = '28.0';
}
#endif
actionref("Trial Balance by Period_Promoted"; "Trial Balance by Period")
{
}
actionref("Detail Trial Balance_Promoted"; "Detail Trial Balance")
{
}
}
group(Category_Category4)
{
Caption = 'Account', Comment = 'Generated from the PromotedActionCategories property index 3.';
actionref("Ledger E&ntries_Promoted"; "Ledger E&ntries")
{
}
actionref(Dimensions_Promoted; Dimensions)
{
}
actionref("Co&mments_Promoted"; "Co&mments")
{
}
}
group(Category_Category5)
{
Caption = 'Prices & Discounts', Comment = 'Generated from the PromotedActionCategories property index 4.';
actionref(SalesPriceLists_Promoted; SalesPriceLists)
{
}
actionref(PurchPriceLists_Promoted; PurchPriceLists)
{
}
}
}
}
trigger OnOpenPage()
var
PriceCalculationMgt: Codeunit "Price Calculation Mgt.";
begin
ExtendedPriceEnabled := PriceCalculationMgt.IsExtendedPriceCalculationEnabled();
end;
trigger OnAfterGetRecord()
begin
NameIndent := 0;
FormatLine();
end;
var
ExtendedPriceEnabled: Boolean;
NameIndent: Integer;
protected var
Emphasize: Boolean;
/// <summary>
/// Sets the current page selection to match the specified general ledger account record set.
/// Used for programmatically selecting accounts in the list for bulk operations.
/// </summary>
/// <param name="GLAcc">Record set of general ledger accounts to select in the list</param>
procedure SetSelection(var GLAcc: Record "G/L Account")
begin
CurrPage.SetSelectionFilter(GLAcc);
end;
/// <summary>
/// Returns a filter string representing the currently selected general ledger accounts.
/// Used for capturing user selections for processing in other procedures or reports.
/// </summary>
/// <returns>Filter string for the selected general ledger accounts</returns>
procedure GetSelectionFilter(): Text
var
GLAcc: Record "G/L Account";
SelectionFilterManagement: Codeunit SelectionFilterManagement;
begin
CurrPage.SetSelectionFilter(GLAcc);
exit(SelectionFilterManagement.GetSelectionFilterForGLAccount(GLAcc));
end;
local procedure FormatLine()
begin
NameIndent := Rec.Indentation;
Emphasize := Rec."Account Type" <> Rec."Account Type"::Posting;
end;
}