web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

Copy GL Account field functionality -- Account Subcategory

(3) ShareShare
ReportReport
Posted on by 68
Hello Everyone,
I have a custom table "G/L Creation Request"and a card page "G/L Creation Request Card"that I use to create new G/L Accounts.
 
On my table, I have two fields:
  • "Account Category" (Field 5): This is an Enum "G/L Account Category".
  • "Account Subcategory" (Field 14): This is a Code[20] with a TableRelation to the "G/L Account Category" table.
I want to copy the standard functionality from the G/L Account Card: when I choose an "Account Category" (like "Assets"), I want the "Account Subcategory" field to automatically be filtered to show only the subcategories that belong to "Assets".
My current TableRelation on the "Account Subcategory" field is just:
 
TableRelation = "G/L Account Category";
 
How can I modify this (and my page) so that the "Account Subcategory" lookup is correctly filtered based on the value I select in the "Account Category" field?
 
Thank you!May be an image of ‎text that says '‎AccountCard 10010 SVB- Checking 4659 Home Account Balance 脇 Iranslations Related Reports Automate ם Posted Documents w...t Incoming Document General Fewer options 寸 Apply ... No. Seved Name 10010 InLorne/Dalarice SVB Chedking 4659 Account AccountCatezory Category ® Balance eel 5earchName Search Name 冷 AccountScocategory Assets Balance ................. Drhit/Crodit Shum SVn CHECKING 4659 Acmunt Recuncilialion Acbuunl Both Automatic lext Totaling * Pasting Posting 5,182.32 No.u Dlank ines Blarkard Hage .77.ИИaЛHй -- last Dste Modifictd ................. 5/30/2024 Omit Default Descr.i Jnl. 0 Revien Palily Ndn IreasuryCategory miimimmm...... Ireasury‎'‎May be an image of screen and text that says 'LADount ard G/L Account Categories 求 EdiLis Description Assets Current Assets /Saveu Accounts Recevable G/L Accounte Caregery XEKEC Assels o Inventory ทิวัดีข่อกง AsstonalResortDefritlan Definition Assets Equlpment Balance Acoumulated Depreciation Acsets ស) 0.00 Accounts Operating 0.00 0.00 Assets 10030 Activitios Assets Operating Activities 0.00 Investing InwvestingActvitles Activities InwestingAclivilies Investing Activities 0.00 000 0.00 0.00 OK Cancel'
I have the same question (0)
  • Suggested answer
    OussamaSabbouh Profile Picture
    1,194 on at
    Copy GL Account field functionality -- Account Subcategory
    Hello,

    You just need to add a filtered TableRelation on the “Account Subcategory” field so it only shows subcategories for the selected “Account Category.”
    TableRelation = "G/L Account Category".Code
        WHERE("Account Category" = FIELD("Account Category"));

    Business Central automatically filters the lookup based on the chosen category, same as the standard G/L Account Card.
     
    Regards,
    Oussama Sabbouh

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sumit Singh Profile Picture

Sumit Singh 2,039

#2
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 1,863

#3
YUN ZHU Profile Picture

YUN ZHU 1,736 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans