Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / How to filter ledger r...
Finance forum

How to filter ledger records based on financial dimension values

(0) ShareShare
ReportReport
Posted on by 65

Hi, 

I want to filter the ledger report records based on the financial dimensions(main account and cost center) criteria i given on report user request form.

For ex, i have given main account 1001 and cost center ABC but all accounts and cost centers data is displaying on my report.

Can any one help me with some sample code to filter the records based on data i provided.

insert_recordset _ledgerTrialBalanceStagingTmp

                   (GeneralJournalAccountEntry, GeneralJournalEntry, LedgerDimension, Text, AccountingDate, PostingLayer, TransactionType)

               select RecId, GeneralJournalEntry, LedgerDimension, Text from generalJournalAccountEntry

                   order by generalJournalEntry.AccountingDate, generalJournalAccountEntry.IsCredit

               join AccountingDate, PostingLayer from generalJournalEntry where

                   generalJournalEntry.RecId == generalJournalAccountEntry.GeneralJournalEntry &&

                   generalJournalEntry.AccountingDate >= _startDate &&

                   generalJournalEntry.AccountingDate <= _endDate &&

                   generalJournalEntry.Ledger == Ledger::current()

               join Type from fiscalCalendarPeriod where

                   fiscalCalendarPeriod.RecId == generalJournalEntry.FiscalCalendarPeriod &&

                   fiscalCalendarPeriod.Type != FiscalPeriodType::Closing;

I want to apply the financial dimension range on the above filtered records.

Please help me.

Thanks

Satish 

  • André Arnaud de Calavon Profile Picture
    293,272 Super User 2025 Season 1 on at
    RE: How to filter ledger records based on financial dimension values

    Hi Satish,

    What is the menu path you are using? It is totally not clear what report you are referring to. I do suspect it is related to a Trial balance, but you have to confirm it.

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: How to filter ledger records based on financial dimension values

    Hello Sathish,

    You can realize this filtering in the trial balance list page. Simply calculate the balances for the period of interest and then show the different findims in separate columns. Once this is done you can export the stuff to Excel or print it. That's possibly the fastest and easiest solution that doesn't need a system modifiation or any other special setup.

    Best regards,

    Ludwig

  • SatishAX Profile Picture
    65 on at
    RE: How to filter ledger records based on financial dimension values

    I am using in report.

    Thanks

    Satish

  • André Arnaud de Calavon Profile Picture
    293,272 Super User 2025 Season 1 on at
    RE: How to filter ledger records based on financial dimension values

    What exact report are you using (or form)?

  • Suggested answer
    Mav Profile Picture
    on at
    RE: How to filter ledger records based on financial dimension values

    Did you tried this

    community.dynamics.com/.../164657

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,272 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,927 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans