Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

How to validate Dimenstions

(0) ShareShare
ReportReport
Posted on by 415

Hi All,

in the new AX 2012, dimension is totally changed. 

my question is, if I use X++ code to generate ledgerTransLine, and user specify dimension set (using from 2012), like center = 90, department =90, purpose =10, ledger account num = 10000

now how can I check this ledger dimension set is valid in 2012? if valid, how can I get LedgerDimension recid?

Regards,

Srinivas

*This post is locked for comments

  • Suggested answer
    Deepak Agarwal Profile Picture
    Deepak Agarwal 8,564 on at
    RE: How to validate Dimenstions

    Hi Srinivas,

    Pl check below post which talks about validating financial dimension via X++ code.

    www.theaxapta.com/.../validate-financial-dimension-combination.html

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to validate Dimenstions

    Try using the following code. If the Ledger Dimension combination is valid it will give you the RecId else it is going to through exception which you can handle it to find whether it is valid or invalid combination.

    static void BFF_ValidateLedgerDimensionMappings(Args _args)

    {

       boolean                 isValid;

       RecId                     ledgerDimension;

       try

           {

               ledgerDimension = DMFDimensionHelper::generateDynamicDimension('2100-90-90-10');

               isValid = true;

           }

           catch

           {

               isValid = false;

           }

        info(strfmt('Dimension result : %1', isValid));

    }

  • Suggested answer
    April Olson Profile Picture
    April Olson on at
    RE: How to validate Dimenstions

    Hello Srinivas,

    I checked in with our engineering team and here are some additional resources:

    how can I check this ledger dimension set is valid in 2012? … I want to give this as a service , is it possible

     

    1)      Dimensions whitepaper documenting the validation services:

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

     

    Specifically section on Page 35 titled: FinancialDimensionValidationService

     

     

    if valid, how can I get LedgerDimension recid?

     

    2)      In the whitepaper under “Ledger account pattern” it discusses the API’s used to work with a LedgerDimension:

    e.g. : DimensionDefaultingEngine::getLedgerDimensionFromAccountAndDim

  • vaasu Profile Picture
    vaasu 415 on at
    RE: How to validate Dimenstions

    Hi ievgen,

    Thanks for replay,

    I want validate the combination of account  like main account-costcenter-market etc.

    if the cost center available then only happen the action other wise show the error information.

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: How to validate Dimenstions

    There is LedgerGeneralJournalService out of the box

    http://axwonders.blogspot.co.nz/2012/08/hi-there-i-hope-everyone-had-good-week.html

  • vaasu Profile Picture
    vaasu 415 on at
    RE: How to validate Dimenstions

    I want to give this as a service , is it possible.

    Regards,

    Srinivas

  • Suggested answer
    Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: How to validate Dimenstions

    Hi vaasu,

    Please take a look at these blog posts

    http://kiwiaxguy.blogspot.co.nz/2014/07/setting-ledgerdimension-field-on.html

    If you will click "check" on journal AX will do validation for you, also you can find code there as well.

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…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,836 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans