Becky Newell has a fantastic blog that has been great in helping me resolve issues around import dimension data into AX 2012 for journal postings.
In this blog ;-
http://blogs.msdn.com/b/axsupport/archi ... -2012.aspx
She gives a great description of how to get the RecID for the associated DimensionAttributeValueCombination record, and this works great for journal lines of type ledger.
Here's an example from a job in the CEU company of the demo AX 2012 database
info(strfmt('%1',AxdDimensionUtil::getLedgerAccountId(['200120-10-06','200120','BusinessUnit','10','CostCenter','06'])));
However I want to import financial dimension for customer and vendor.
I've seen a number of posts vaguely describe using the AxdDimensionUtil::getMultiTypeAccountId method. However I cannot seem to get this to work. If I pass it into the LedgerDimension field of the journal trans it correctly show me the customer account however the dimensions do not come through.
Example again in the CEU company demo AX 2012 database.
info(strFmt('%1',AxdDimensionUtil::getMultiTypeAccountId(enumNum(LedgerJournalACType),LedgerJournalACType::Cust,['2014-10-06','2014','BusinessUnit','10','CostCenter','06'])));
This returns a RecID of 5747269819, which correctly is the customer 2014 but the dimensions are not there, If I change this up (cost center 3 instead of 6) and run it again
info(strFmt('%1',AxdDimensionUtil::getMultiTypeAccountId(enumNum(LedgerJournalACType),LedgerJournalACType::Cust,['2014-10-03','2014','BusinessUnit','10','CostCenter','03'])));
It returns the same RecID 5747269819, so I know for sure that the dimensions I am passing as parameters are not having an impact.
Am I using this function wrong? If so what is the best way to set financial dimension for a journal line when importing Customer or Vendor type accounts?
Comments
An example below for adding financial dimension for customer -
Hope this helps.
Long way to go before I sleep..
Thanks so much for the stub.
I'll give this a run out for sure, I noticed that you were updating the CustTable DefaultDimension.
And I didn't really explain what I was doing very; I am importing into a journal for master data load. In fact I am importing into the LedgerJournalTrans.
However I think the principle will still work if I push this into DefaultDimension and OffsetDefaultDimension fields.
Again, much appreciated
t
I didn't realise you are importing journal lines. Like I said, I use the routine I posted only for masters (customers, vendors etc).
For journals I use 'AxdDimensionUtil::getLedgerAccountId' method which always does the trick for me.
Long way to go before I sleep..
Let's say for simplicity I import just the customer no., and 1 dimension values into the LedgerJournalTrans.
Customer No. :- C100
CostCenter :- ABC
I build my Dimension Container the same way I do for ledger
(code simplified for easy of reading)
give me an error that "Main Account ID C100 does not exist"
am I using the function correctly?
Try this -
Please let me know how it goes.
Long way to go before I sleep..
Sorry for the delay in replying.
I have been trying the method you mentioned, however I get an error that the main account does not exist.
t
You receive that error because the framework only expects main accounts.
Please try using the code snipped I posted on 3rd Oct. Obviously instead of customer table, it has to be ledger journal trans table.
Long way to go before I sleep..
I have a question generally importing the master data is Functional consultant job or Technical consultant job ?
If we need to import the master data like Customer , vendor , Item , Bank , Fixed assest , customer address , vendor address , Global addressess book..............
a) In each table what are all the fields need to consider ?
b) what would be sequence to import the data ?
c) Do i need to use the data scripts or standard Data Migration tool of AX 2009 ?
d) Is there any MS manual is availble which will explain about the Master data & opening balances migration process ?
Please clarify my doubts and share your experience.
Thanks in advance.
Hey Harish,
I had used that code and was still getting the same error.
In the end I engaged a nice gentleman from Fargo and here is the solution
The RecID can then be passed to the defaultDimension on the LedgerJournalTrans
So I for an example with dimensions Cost Center and Department
So for the General Journal Line I created regardless of if its a customer or a vendor or bank, that line has the financial dimensions for CostCenter OU_3567, and Department as OU_2310
Perhaps I was mis-explaining the issue.
Hey Lally
Start here :-
http://mukesh-ax.blogspot.ca/2012/06/cr ... -2012.html
Also the developer cookbook for AX 2012 I found useful.
t