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 サービスを使用して実際に作成される顧客を作成しようとしています。上記のコード スニペットはそのためのコードですが、次のように例外を与えています。
Request Failed. See the Exception Log for details.
作成されていない実際の理由さえわかりません。Dynamics AX 2009 sp1 で顧客を作成する方法は?
注: CustService は、CustomerSvc 名前空間のクラスの CustomerService オブジェクトです (Dynamics の CustomerService Web サービスへの Web サービス参照です)。