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)

Trial balance - Export - Performance

(0) ShareShare
ReportReport
Posted on by 451

Hi Guys,

I am looking to improve the performance of export to excel of the Account number form which comes after clicking "Posted" button on trial balance list page . I have a code to export to excel using arrays but I am unable to get the required records in the excel. I am trying to find the link between the list page and the GeneralJournalEntry table. There is DimensionAttributeValueCombination.DisplayValue but that has no link to the table GeneralJournalEntry .

7271.code.jpg

0246.form.jpg

thanks

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    István Orosz Profile Picture
    2,137 on at

    Hi,

    This is the table relation:

    DimensionAttributeValueCombination.RecId == GeneralJournalAccountEntry.LedgerDimension

    GeneralJournalAccountEntry.GeneralJournalEntry == GeneralJournalEntry.RecId

    Regards,

    István

  • Dev Profile Picture
    451 on at

    Thanks István , I need all the journal numbers from GeneralJournalEntry table for the account number in the list page as attached in the screenshot of my question but by this way I will only get one record.

  • Suggested answer
    István Orosz Profile Picture
    2,137 on at

    Hi,

    Please check the LedgerTransAccountTmp::fillAndReturnCreatedTransIdFromLedgerDim() static server side method, you should do something similar to get all the referenced records. First creates a query in the first while select and if statements, result is like this:

    SELECT RecId FROM DimensionAttributeValueCombination(DimensionAttributeValueCombination_1) WHERE ((LedgerDimensionType = 0)) EXISTS JOIN * FROM DimensionAttributeValueGroupCombination(DimensionAttributeValueGroupCombination_1) WHERE DimensionAttributeValueCombination.RecId = DimensionAttributeValueGroupCombination.DimensionAttributeValueCombination JOIN RecId FROM DimensionAttributeLevelValue(DimensionAttributeLevelValue_1) ON DimensionAttributeValueGroupCombination.DimensionAttributeValueGroup = DimensionAttributeLevelValue.DimensionAttributeValueGroup AND ((DimensionAttributeValue = 5637150628))

    then inserts the records at the end in the second while select:

       while (queryRun.next())

       {

           dimAttrValueCombo = queryRun.get(tableNum(DimensionAttributeValueCombination)) as DimensionAttributeValueCombination;

           ledgerTransAccountTmp.LedgerDimension = dimAttrValueCombo.RecId;

           ledgerTransAccountTmpList.add(ledgerTransAccountTmp);

       }

       ledgerTransAccountTmpList.insertDatabase();

    If you want to use LedgerTransAccountTmp for your own purposes, please be aware that it is a regular table and not a temporary.

    Regards,

    István

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans