Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Relation Between MainAccount Table And GeneralJournalAccountEntry

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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
    Chaitanya Golla 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
    Community Member Microsoft Employee 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
    Chaitanya Golla 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
    Community Member Microsoft Employee 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
    Chaitanya Golla 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
    Community Member Microsoft Employee 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
    Community Member Microsoft Employee on at
    RE: Relation Between MainAccount Table And GeneralJournalAccountEntry

    I need Opening balance , Debit  And credit

  • Chaitanya Golla Profile Picture
    Chaitanya Golla 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
    Community Member Microsoft Employee 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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,234 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,994 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans