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
Hi Srinivas,
Pl check below post which talks about validating financial dimension via X++ code.
www.theaxapta.com/.../validate-financial-dimension-combination.html
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));
}
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
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.
There is LedgerGeneralJournalService out of the box
http://axwonders.blogspot.co.nz/2012/08/hi-there-i-hope-everyone-had-good-week.html
I want to give this as a service , is it possible.
Regards,
Srinivas
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.
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,836
Most Valuable Professional
nmaenpaa
101,156