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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Creating a ledgerJournalTrans record in an existing LedgerJournalTable (2012 R3 CU8) with a valid ledgerDimension

(0) ShareShare
ReportReport
Posted on by

I'm trying to import some data from an external database into a general journal.  I've got it working in general minus the fact that my ledgerDimension values are not coming up correctly.  

These are line items that will contain a date, an account type of ledger, and either a debit or credit.  So they are all main accounts.  To get the ledger dimension I simply call this for example:

ledgerTrans.parmLedgerDimension(DimensionStorage::getDefaultAccountForMainAccountNum('1234567')); 

where 1234567 is the main account.  When I launch the general journal form I am getting stack trace errors now because it's reaching back to a dimensionAttributeValueCombination that no longer exists.

How can I get this to construct the proper ledgerDimension recid on insert.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Brandon Wiese Profile Picture
    17,790 on at

    You cannot use a Default account in a ledger journal.

    Take the value that you get back from DimensionStorage::getDefaultAccountForMainAccountNum() and pass it through DimensionDefaultingService::serverCreateLedgerDimensions() to arrive at a DAVC record ID that you can put on LedgerJournalTrans.

  • André Arnaud de Calavon Profile Picture
    304,126 Super User 2026 Season 1 on at

    Brandon is correct.

    I was just looking for the exact name of the same method. Then I noticed Brandon already answered.

  • Brandon Wiese Profile Picture
    17,790 on at

    I believe starting in R3 CU9 or CU10 you can pass a default dimension through one of the merge methods on the same class and it will translate implicitly also.  So, there are many ways to accomplish that specific task.

  • Community Member Profile Picture
    on at

    That worked perfectly.  Thank you so much

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 16

#2
GiacomoRovai Profile Picture

GiacomoRovai 4

#3
Douglas Noel Profile Picture

Douglas Noel 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans