2

I am trying to integrate Dynamics ax 2012 to a third party application using AIF services. The service in question is the out of the box InventOnHandService to which I have added the update method.

Update document service

InventoryOnHandService

However then when I try to set up the service on the inbound port as such:

enter image description here

I get the following error.

Error Log

I followed this tutorial as a guideline. I have also tried creating a new entry point on a InventInventoryOnHandServiceUpdate Permission I created which did not yield to a better outcome. I have also try recompling the entire project and re-generating the full CIL.

Any help would be greatly appreciated as I am still relatively new with Dynamics and it's limited documentation is not doing the trick for my current issue.

Thanks

Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50
e_phi
  • 166
  • 1
  • 9
  • 2
    Curious, what should the OnHand update method do? – Jan B. Kjeldsen Apr 14 '16 at 17:27
  • Hello @jan-b-kjeldsen I am trying to update the quantity in the InventSum table. – e_phi Apr 14 '16 at 17:41
  • 4
    But that makes no sense, onhand values are read only. Quantities are changed by making inventory transaction, other services do that. – Jan B. Kjeldsen Apr 15 '16 at 06:27
  • Thank you for the response. I'm unfamiliar with the services you speak of, may you guide me in the right direction? Thanks! – e_phi Apr 15 '16 at 16:11
  • Well, it depends on what kind of inventory transaction. `InventCountingJournalService.create` deals with inventory counting while `SalesSalesOrderService.create` deals with sales orders. There are others all found in the Services node in the AOT. – Jan B. Kjeldsen Apr 16 '16 at 22:10

1 Answers1

0

AIF Document service are used to do CRUD operation on Ax tables. InventSum table is summary table storing Inventory onhand for all inventory transactions happened in Ax system and that used to get updated when ever CUD operations happens on Inventory Transactions table. It is not advised to update both InventSum and InventTrans directly. Those tables get updated through other source documents like sales line, purch line etc. So InventoryOnHand service should only be used for reading the available onhand information. Please find similar question in dynamics community too. http://community.dynamics.com/ax/f/33/t/101203

Your question is regarding the error on enabling update operation on inventory onhand service and my advise is not to add CUD operation to onhand service.