AIF: ‘EndElement’ is an invalid XmlNodeType

April 20, 2010 at 11:31
filed under AIF, Dynamics AX
Tagged , , ,

Hi all.

I got this error when developing a C# .NET application that consumed a AIF web service, and couldn’t find a solution online so let me share mine :-).

The problem was that I initialised my queryCriteria wrong:

CriteriaElement ace = new CriteriaElement();
ace.FieldName = "AccountNum";
ace.Value1 = "000001";

I forgot the specify the datasourcename and operation:

CriteriaElement ace = new CriteriaElement();
ace.FieldName = "AccountNum";
ace.Value1 = "000001";
ace.DataSourceName = "VendTable";
ace.Operator = Operator.Equal;

no comments

RSS / trackback

respond