1
CustomerService CustService = new CustomerService();
try
{
CustService.Credentials = new NetworkCredential("xxx", "xxx", "xxx");
AxdCustomer customer = new AxdCustomer();
AxdEntity_CustTable[] table = new AxdEntity_CustTable[1];
AxdEntity_CustTable test = new AxdEntity_CustTable();
test.AccountNum = TextBox1.Text;
test.Name = TextBox1.Text;
test.CustGroup = DropDownList1.SelectedItem.Value;
table[0] = test;
customer.CustTable = table;
CustService.create(customer);
}
catch (Exception ex)
{
err.Visible = true;
lblerr.Text = ex.Message;
}
我是Dynamics AX的新用户。我试图创建一个客户,它实际上是通过从Web上消费一个Web服务创建的。上面的代码片段是该代码,但它给一个异常:Dynamics AX 2009:无法通过使用AxdCustomer的webservice保存新客户类
Request Failed. See the Exception Log for details.
我还没有得到它为什么没有得到创建的实际原因。如何在动态AX 2009 SP1中创建客户?
注意:CustService是CustomerSvc命名空间中类的CustomerService对象(它是对Dynamics中CustomerService Web服务的Web服务引用)。