AIF Get Sales Order number

HI Everyone,

Could you please tell how to get SalesOrder number created in AX through AIF create service method.

I went through following link and created SalesOrder through C sharp.

I actually need sales order number which is created in AX. If you observe in above link you will notice following line of code:

keys = client.create(callcontext, salesorder);

Somehow Keys is getting something which I believe has the sales order number in it.

Could you please tell how to get sales order number once sales order created in AX.


Why don’t you simply look at what you want? Are you familiar with the debugger? It’ll show you all these things, therefore you should learn how to use it.

Your own link already tells you that it’s an array of EntityKey objects. Each entity key may consist of sever

If I remember it correctly, EntityKey has KeyData property containing an array of KeyField objects. In this case, there will be just one, with Field property = “SalesId” and Value property containing the actual order number.

It worked. Thanks.