Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

AX 2012 R2 AIF Services - CountingJournalServiceClient

$
0
0

Hello,

I'm trying to import inventory opening balances using a count journal (found on the front end via Inventory & warehouse management > Journals > Item Counting > Count)

I'm using AIF services so that I can connect directly to the legacy database via Entity Framework, suck in the data, transform it as required in the code, then push to AX using the InventCountingJournalService service operation.

The problem I am having is that the document won't validate. I'm getting red herring errors such as "Warehouse MW does not exist". When inspecting the XML document I'm not specifying a warehouse called "MW" anywhere. Also, there is no MW warehouse set up in the system, so I have no idea where it is getting "MW" from. Also, errors such as "Inventory dimension Site is mandatory and must consequently be specified". I have specified it and confirmed in my document XML that it is present.

I did find somewhere on the net that for importing/creating vouchers I should be specifying values for the VoucherNumberSequenceTable variable in the AxdEntity_InventJournalTable object. I did this as well, and set it up to look like this in code:

inventJournalHeader.VoucherNumberSequenceTable = new AxdEntityKey_NumberSequenceTable()

           {

               NumberSequence = AXMap.AXVoucherID,

               NumberSequenceScope_DataArea = "mxc",

               NumberSequenceScope_FiscalCalendarPeriod_FiscalCalendarYear_FiscalCalendar_CalendarId = "MXC",

               NumberSequenceScope_FiscalCalendarPeriod_FiscalCalendarYear_Name = "MXC",

               NumberSequenceScope_FiscalCalendarPeriod_Name = "Period 5",

               NumberSequenceScope_LegalEntity_DataArea = "mxc",

               NumberSequenceScope_OperatingUnit_PartyNumber = "00000027"

           };

where AXMap.AXVoucherID is a pre-defined mapping of data where I am hardcoding in certain keys to match legacy system site #s to AX site/warehouse #s to find the Voucher number sequence for the correct site/warehouse

I'm stumped. Does anybody have any clue what I am doing wrong?


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>