How to send Sales Order details in a method call in ax 2012

Hi All,

I have dot net dll files, by consuming those files i need to send sales order details to C# method based on fromdate and to date. Can you please let me know how to return sales order?

Can you provide more details? What do you mean by sales order details? Tables? AIF document classes? Custom X++ classes? Classes defined in the .NET assembly?

In general, .NET Interop from X++ is the technology that allows calling methods defined in .NET. You can also use proxy classes to work with X++ classes and tables from C#.

If you want to obtain data from C#, you could also use LINQ to AX.

Hi Martin,

In dot net dll they wrote one function, in that function parameters are from date and to date. In our Ax we need to read these two values and based on those date values we need to return Sales Order information( mean orderId, accountNum… some fields) to that function written in dot net dll file.

It sounds like that your process starts in .NET, so you don’t want to call something from AX - you want to call some logic in AX (from .NET) that will receive two parameters (from date and to date) and return some data.

If it’s correct, you need to create a method in AX (accepting parameters, returning the data you need) and either add your .NET solution to AOT and call the method through a proxy class or expose the method as a custom service.

If you need more help, please tell us more about what you’re doing. Start from the overall picture, not from implementation details.