web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

i need create C# wcf service to add ax 2012 inventory movement

(0) ShareShare
ReportReport
Posted on by
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
what missing or solution for this project
Categories:
I have the same question (0)
  • Suggested answer
    Anton Venter Profile Picture
    20,554 Super User 2025 Season 2 on at
    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.

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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 612 Super User 2025 Season 2

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 437 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans