Friday, October 21, 2011

Calling AIF Web Service - not sending all the fields into AX

We had the occasion to call the Dynamics AX SalesOrder create web service. However, we were trying to pass in the SalesOrder.SalesType field and it wouldn't come through in the XML that AIF read. The element and the attribute were not there in the XML file. We spoke with someone at Microsoft and they told us that you had to use the "specified" property on the field. For example (this is C#):

salesOrder.SalesType = AxdEnum_SalesType.Sales;
salesOrder.SalesTypeSpecified = true;

This seemed to do the trick!

No comments:

Post a Comment