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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Change Main Account in Ledger Dimension in General Journal Entry at time of posting

(1) ShareShare
ReportReport
Posted on by 89

I have a requirement to change just the Main Account (first segment) in the Ledger Dimension account number control on the LedgerJournalTransDailyForm at the time of journal posting from a separate form. The control that I would like to update through code is LedgerJournalTrans_AccountNum. Please let me know if anyone has had a similar requirement; I would like to be pointed towards the class/method to extend in order to override and change the main account that is segmented in Ledger Dimension only on this LedgerJournalTransDailyForm. Or if there is a useful event handler I could extend. Thank you.

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,158 Super User 2025 Season 2 on at

    Hi Tristan,

    What is the exact business scenario and reason to change the main account? Usually, the accounting officer will tell the general journal what should be posted. Why do you need to change this?

  • tristansenk99 Profile Picture
    89 on at

    Hi Andre,

    The request comes for budget control purposes. From my understanding, the business would like to have the main account be switched in GL entries to a specific budget control account for certain accounting groups (i.e. supplies, tools, etc.). However, the financial voucher transaction lines should maintain the original main account. It is a strange request but they insist that it is the route they want to take.

    Goal here is to swap out the main account used at the time of the GL journal creation to separate the financial journal transaction vouchers for what is actually hitting the ledger budgets for analytics purposes while also maintaining budget control.

    Currently, I have added an additional column called "Budget Control Account" on the Invent Posting form which will be populated with the budget control main account that they want for each Inventory Posting type (see screenshot below). This number would be different than the main account column number for certain posting types and accounting groups.

    3b4e1ab2_2D00_e00b_2D00_4001_2D00_a17e_2D00_ee22adf98636.png

    After the Journal is posted, the logic will look inside the item details for the transaction and retrieve the accounting group assigned to it

    aa49e739_2D00_490e_2D00_479c_2D00_b092_2D00_2736dd292994.png

    Additionally, the logic will go into the financial voucher transactions to retrieve the Posting Type

     808c448f_2D00_c787_2D00_4c2a_2D00_9643_2D00_db67525aba2d.png

    Finally, when the journal is posted, it should insert 533104-5990-520-3-20- for a debit of 4.34 as the only line within the GL journal for this specific example in the screenshots. We don't need to insert a line in the GL entry for the offset account because this information will be stored and referenced in the original financial voucher transactions.

    I imagine that I would have to write a method to generate a new ledger dimension RecID, but instead pointing main account to the new budget control account column. Any tips on the best way to go about this would be much appreciated.

    Thanks so much!

  • tristansenk99 Profile Picture
    89 on at

    Update: I got the generate ledger dimension method to work so I can now successfully change main accounts as long as they comply with the configured account structures.

    If you have any tips on select statements/queries to retrieve the above information in the screenshots would also be helpful as it involves several tables with little or no relation. Also there will be multiple transactions in each journal that will have different accounting groups and posting types.

    In general, I need the query to do something like below.

    select invent LedgerTrans_Posting (under posting type) and set this to InventTransType on inventPosting Table
    View postings > financial > transactions > while select Item Number > select Accounting group > set to item relation in InventPosting
    select custom value from new budgetcontrolaccount column
    Select mainaccountvalue from DimensionAttributeValueCombination where recid == custom budgetcontrolaccount value

    Any other more general tips for this enhancement would also be appreciated!

  • André Arnaud de Calavon Profile Picture
    301,158 Super User 2025 Season 2 on at

    Hi Tristan,

    I have never changed this posting logic. So, I don't have technical tips. I only wonder if this is something that could be solved with reporting after the journals are posted.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans