CRUD operation in AX tables using C#

对着背影说爱祢 提交于 2019-12-21 23:33:52

问题


I am new in AX.

My boss gave me to task to access tables of AX 2012 from C#.

Following are the criteria:

  1. Code should be generic. (user will give me table name, column name and any condition if there, to execute insert, delete, update or select queries).
  2. Client and server may be or may not be in same
  3. Client and server may be or may not be in same domain Without any installation on client machine

I tried Business connector. But, we can't use business connector outside the domain and it requires installation on client machine

I tried web service. But, We need to add service reference for each web service group.

Is there any thing best suitable for my requirement? Or am I missing something while using above two ways?

Please help to resolve this issue. I am doing this since last month.


回答1:


You can use AifGenericDocumentService. The wsdl is available by default at http://_AOS_:_8101_/DynamicsAx/Services/AifGDS?singleWsdl.

This is a generic web service, so if you don't know the schema for target tables you can also use MetadataService at http://_AOS_:_8101_/DynamicsAx/Services/MetadataService?singleWsdl

You can see an example at https://community.dynamics.com/ax/b/microsoftdynamicsaxintegration/archive/2012/05/06/microsoft-dynamics-ax-2012-application-integration-framework-custom-web-service-loosely-typed



来源:https://stackoverflow.com/questions/31537272/crud-operation-in-ax-tables-using-c-sharp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!