hi all
i try to create C# wcf service to add ax 2012 inventory movement
in ax 2012 side i created query with
InventJournalTable
|->InventJournalTrans (as datasource)
|-->InventDim (as datasource)
|->InventJournalName (as datasource)
then create AIF Document
after that i create Inbound servcie
then call it in c#
when i try add header line i get many exceptions in ax like
The value in field VoucherNumberSequenceTable is invalid.
Data source InventDim not in query
in c# in AxdEntity_InventJournalTable
AxdEntity_InventJournalTrans
InventJournalServiceCreateRequest
I have not checked how feasible this is nor have I checked if there is any standard data entity available for this. I am making some assumptions here that it is feasible and that there is no standard data entity available for this. This is a bit of a high level design, hope it helps.
In AX 2012 when processing a flow like inventory movement in a movement journal, the system will enforce the mandatory fields and will apply business logic so that the data being entered into the system, the journal in this case, is correct and makes sense.
I suggest that you split your design into data entry and business logic. In other words, first create the data in the system (in the staging tables), then create the journals from the staging table data.
It is a robust design and it means that the data entity is only used for creating the data in the system (in staging tables), and not directly in the journal tables. The data entity should validate mandatory fields and do basic validation. The processing code then uses the data in the staging tables to create the journals.
I recommend you follow these steps:
Create reusable code in X++ to create movement journals*
Create the data entity in AX 2012 based on your code from step 1
Create dedicated staging tables in AX 2012 for your data (not the staging tables used in the data entity)
Create X++ code to process the data in the staging tables and to create the movement journals from the data.
*There might be some reusable code or at least some standard examples in the application.
Was this reply helpful?YesNo
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.