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 :
Microsoft Dynamics AX (Archived)

How to get Main account type of Main Account in x++

(0) ShareShare
ReportReport
Posted on by 1,813

Hii,

I am developing RDP report from LedgerJournalTrans table. The requirement is to select transactions of Main account type Profit and Loss  and other report for Balance Sheet accounts from LedgerJournalTrans table with some other criteria. 

How to know from (General journal -> Lines)  LedgerJournalTrans.LedgerDimension the Main Account is of type Profit and Loss or Balance Sheet in processReport method. 

Please some code examples. 

Thanks,

*This post is locked for comments

I have the same question (0)
  • Rana Anees Profile Picture
    1,813 on at

    In the following while loop where i need to select Main account type

    while select ledgerJournalTrans where ledgerJournalTrans.Voucher==voucherNum

    {

    }

    any solution please...

  • Rana Anees Profile Picture
    1,813 on at

    help please..

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi Rana Anees,

    Why you want to develop a report for this purpose?

    Aren't  the standard reports and Management Reporter already sufficient?

    Best regards,

    Ludwig

  • Rana Anees Profile Picture
    1,813 on at

    Hii Ludwig Reinhard,

    You are right, actually we have two new customized fields in LedgerJournalTrans table for vehicle expenses and for reporting purpose only. When we create general journal or payment journal, we select and save those fields based on some scenarios.

    I have a report that selects and shows required information and its perfect for our finance dept. But sometimes, our data entry operator mistakenly, selects and saves these new fields with balance sheet accounts while its only for profit and loss accounts.

    That's why I need some way to select only Profit and Loss accounts from my RDP class.

    Best Regards,

    Anees    

  • Verified answer
    Mea_ Profile Picture
    60,284 on at

    Hi Rana Anees,

    Please refer to this thread community.dynamics.com/.../152606 discussing how to get main account from ledger dimensions. Having main account you can filter records by type easily.

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi Rana Anees,

    Is it still an option for you to use reason codes instead of those added field? They are actually made for this purpose and can be analyzed in Management Reporter out of the box.

    If it is already too late, please have a look at the answer of ievgen.

    All the best,

    Ludwig

  • Rana Anees Profile Picture
    1,813 on at

    Hii Ludwig Reinhard,

    I have one more request from finance to add two more customized fields on general journals and payment journal forms. I will be very happy to understand and use reason codes.

    Could you please explain more about reason codes, how and where to use on forms and MR.

    Best Regards,

    Anees

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi Anees,

    You can find some Information about reason codes on the following site:

    https://technet.microsoft.com/en-us/library/gg242861.aspx

    Once you specify them in a transaction (e.g. Journal) you can filter and report - that is print - them in Management Reporter by making use of row modifiers.

    Example:

    4555.rc.png

    Reason codes are tracked similar to ledger accounts but users have a higher degree of freedom how, when and where to use them.

    Hope this helps.

    Best regards,

    Ludwig

  • Rana Anees Profile Picture
    1,813 on at

    Hii Ludwig Reinhard,

    About the reason codes, my requirement is we have a report at

    AP -> Payment Journal -> a journal -> Lines -> Print -> Bank Local Transfer Report .

    This is bank draft request form from a bank where we print info from our ERP.

    Our new requirement is to add two new fields (Check Boxes) Transfer and Bank Draft on Payment Journal lines form. The data entry operator will select Transfer and Bank Draft check boxes for a required transaction.

    If Transfer or Bank Draft or both are selected,  then should be printed on Bank Local Transfer Report.

    This report is based on Report Data Provider (RDP).


    bnk.PNG

    I think we can select only one reason code for one line, but we need two. 

    Sir, do you think Reason Codes is the solution for this requirement. 

    Regards,

    Anees

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi Anees,

    This requirement cannot be fulfilled with reason codes especially that you can chose only one.

    Also the bank local transfer report is not a standard report, so I believe that you might be better off with the solution that you have chosen for the additional new checkboxes.

    Best regards,

    Ludwig

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans