Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Relation Between MainAccount Table And GeneralJournalAccountEntry

(0) ShareShare
ReportReport
Posted on by

Hi ,

I need to make ssrs report by x++ code , insert main Account Id and Interval From Date and To Date 

The result is TransactionCurrencyAmount for every transaction 

any help to bind tables 

Thanks .

*This post is locked for comments

  • Suggested answer
    Chaitanya Golla Profile Picture
    17,225 on at
    RE: Relation Between MainAccount Table And GeneralJournalAccountEntry

    Hi,

    Please try once with the below code:

    static void Job12(Args _args)
    {
        DimensionAttributeValueCombination  DimensionAttributeValueCombination;
        DimensionHierarchyLevel             hierarchyLevel;
        GeneralJournalEntry                 generalJournalEntry;
        GeneralJournalAccountEntry          generalJournalAccountEntry;
        DimensionAttribute                  dimensionAttribute;
        MainAccount                         mainAccount;
        AmountMSTDebCred                    CurCodeCont, trans;
        DimensionFocusBalance               DimensionFocusBalance;
        
        while select generalJournalAccountEntry
           Join generalJournalEntry 
           where generalJournalAccountEntry.GeneralJournalEntry == generalJournalEntry.RecId
            && generalJournalEntry.AccountingDate == str2Date('01/01/2016',123)
           Join DimensionAttributeValueCombination
           where DimensionAttributeValueCombination.RecId == generalJournalAccountEntry.LedgerDimension
          //  && DimensionAttributeValueCombination.LedgerDimensionType == LedgerDimensionType::DefaultAccount
           Join MainAccount
           where mainAccount.MainAccountId =='2385'
         && mainAccount.RecId == DimensionAttributeValueCombination.MainAccount
       {
          CurCodeCont += generalJournalAccountEntry.AccountingCurrencyAmount;
          trans += generalJournalAccountEntry.TransactionCurrencyAmount;
           
          // GJN += generalJournalEntry.RecId;
       }
        
        info(strFmt("%1, %2", CurCodeCont, trans));
    }
  • Community Member Profile Picture
    on at
    RE: Relation Between MainAccount Table And GeneralJournalAccountEntry

     This is my code but the output need more filter

    while select AccountingCurrencyAmount from generalJournalAccountEntry

           Join generalJournalEntry Join DimensionAttributeValueCombination

       Join MainAccount Join DimensionHierarchy

       where mainAccount.MainAccountId =='2385'

       && mainAccount.RecId == DimensionAttributeValueCombination.MainAccount

       &&DimensionAttributeValueCombination.RecId == generalJournalAccountEntry.LedgerDimension

       &&generalJournalAccountEntry.GeneralJournalEntry == generalJournalEntry.RecId

       && generalJournalEntry.AccountingDate == str2Date('01/01/2016',123)

       {

          CurCodeCont += generalJournalAccountEntry.AccountingCurrencyAmount;

           GJN += generalJournalEntry.RecId;

       }

  • Suggested answer
    Chaitanya Golla Profile Picture
    17,225 on at
    RE: Relation Between MainAccount Table And GeneralJournalAccountEntry

    Hi,

    You can find the query in the method populateTmpTransSummary(Line#  194)of class LedgerTrialBalanceDP.

     // Insert transactions prior to start date as Opening transactions
            insert_recordset _ledgerTrialBalanceStagingTmp
                (AccountingDate,
                LedgerDimension,
                DetailSummary,
                AmountDebit,
                AmountCredit,
                PostingLayer,
                TransactionType,
                PrimaryFocus)
                select minOf(AccountingDate), FocusLedgerDimension, summary, sum(DebitAccountingCurrencyAmount), sum(CreditAccountingCurrencyAmount), PostingLayer, opening
                from dimensionFocusBalance
                         group by dimensionFocusBalance.FocusLedgerDimension, dimensionFocusBalance.PostingLayer, dimensionAttributeValueCombination.DisplayValue
                    where
                        dimensionFocusBalance.FocusDimensionHierarchy == _primaryDimensionSet.RecId &&
                        ((dimensionFocusBalance.AccountingDate < _startDate && dimensionFocusBalance.AccountingDate >= periodStartDate) ||
                         (dimensionFocusBalance.AccountingDate >= periodStartDate && dimensionFocusBalance.FiscalCalendarPeriodType == FiscalPeriodType::Opening && !_includeOpeningInDetail)) &&                    dimensionFocusBalance.Ledger == Ledger::current() &&
                        dimensionFocusBalance.AccountingDate <= _endDate &&
                        dimensionFocusBalance.IsSystemGeneratedUltimo == NoYes::No &&
                        dimensionFocusBalance.Ledger == Ledger::current()
                join DisplayValue from dimensionAttributeValueCombination where
                    dimensionAttributeValueCombination.RecId == dimensionFocusBalance.FocusLedgerDimension;


  • Community Member Profile Picture
    on at
    RE: Relation Between MainAccount Table And GeneralJournalAccountEntry

    How can I see the X++ code i need to know the path

  • Chaitanya Golla Profile Picture
    17,225 on at
    RE: Relation Between MainAccount Table And GeneralJournalAccountEntry

    I feel that information is available on TrailBalance form, are you looking for X++ code which provides this details.

    Path: General ledger/Common/Trial balance

  • Community Member Profile Picture
    on at
    RE: Relation Between MainAccount Table And GeneralJournalAccountEntry

    Hi Sukrut Parab ,

    OperationsTax::Current   Operand types are not compatible with the operator.

  • Community Member Profile Picture
    on at
    RE: Relation Between MainAccount Table And GeneralJournalAccountEntry

    I need Opening balance , Debit  And credit

  • Chaitanya Golla Profile Picture
    17,225 on at
    RE: Relation Between MainAccount Table And GeneralJournalAccountEntry

    Hi,

    Can you provide the details of the data you want to extract by passing this values.

  • Community Member Profile Picture
    on at
    RE: Relation Between MainAccount Table And GeneralJournalAccountEntry

    Hi Chaitanya Golla  ,

    But I need To Insert  Account Number Id And Filter All Data By Acc. No. And Date

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 48

#3
shanawaz davood basha Profile Picture

shanawaz davood basha 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans