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服務引用)。