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 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

I have the same question (0)
  • Suggested answer
    Mea_ Profile Picture
    60,284 on at

    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.

  • vaasu Profile Picture
    415 on at

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

    Regards,

    Srinivas

  • Mea_ Profile Picture
    60,284 on at

    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
    415 on at

    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.

  • Suggested answer
    April Olson Profile Picture
    on at

    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

  • Suggested answer
    Community Member Profile Picture
    on at

    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
    Deepak Agarwal Profile Picture
    8,598 on at

    Hi Srinivas,

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

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

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
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans