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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)
Answered

Ledger Dimension in D365 through code

(0) ShareShare
ReportReport
Posted on by 55

Hi All,

How to create ledger dimension combination account.

In Ax 2012 it is like :

ledgerJournalTrans.LedgerDimension = AxdDimensionUtil::getLedgerAccountId(ledgerDimensionsContainer);

* In D365 getLedgerAccountId method is not available.

Can any one suggest what is the exact replacement of above class/method.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Sukrut Parab Profile Picture
    71,741 Moderator on at

    Hi Khadar ,

    Use LedgerDimensionFacade class instead , this class has number of methods or methods equivalent to what you used in Ax 2012 using AXdimensionUtil class .

  • khadar shaik Profile Picture
    55 on at

    Hi Sukrut,

    Here i am passing container i want to get ledger dimension.

    ledgerDimensionCon = ['MainAccount', mainAccountId, 7, "BusinessUnit", '', "CostCenter", '',
    "Department", '', "PONumber",purchaseOrderId, "POShipment",shipmentId, "Salesinsight",''];

    as you said above we have to use that class in which method we can pass the container.

    your help is highly appreciated.

  • Verified answer
    Sukrut Parab Profile Picture
    71,741 Moderator on at

    Hi Khadar ,  

    There is not method which accepts container in that class. There are number of ways you can achieve what you want . Take a look at below  references

    community.dynamics.com/.../resolve-ledger-dimension-through-x-d365fo

    www.linkedin.com/.../generate-financial-dimension-ledgerdimension-dynamics-yadav

  • khadar shaik Profile Picture
    55 on at

    Thank you sukrut,

    Issue got resolved through above link.

    Regards,

    Khadar

  • AxTushar Profile Picture
    1,355 on at

    Hi Khadar

    I am not able to open first link and my requirement here is to create Ledger dimension from Main account Id and Default dimension which I use to do like this:

    DimensionDefaultingService:: serviceCreateLedgerDimForDefaultDim(_myDefaultDim, AxdDimensionUtil::getLedgerAccountId(MyMainAccContainer));

    I got substitute class for DimensionDefaultingService which is LedgerDimensionFacade with desired method, but not able to find getLedgerAccountId method from AxdDimensionUtil class.

    Appreciate your help..

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Sanhthosh.Kumar.K Profile Picture

Sanhthosh.Kumar.K 2

#2
Raed Salah Bzour Profile Picture

Raed Salah Bzour 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans