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 サービスを使用して実際に作成される顧客を作成しようとしています。上記のコード スニペットはそのためのコードですが、次のように例外を与えています。

Request Failed. See the Exception Log for details.

作成されていない実際の理由さえわかりません。Dynamics AX 2009 sp1 で顧客を作成する方法は?

注: CustService は、CustomerSvc 名前空間のクラスの CustomerService オブジェクトです (Dynamics の CustomerService Web サービスへの Web サービス参照です)。

4

1 に答える 1

1

WebサービスとAOSがホストされているサーバーのイベントログを見てください。そこから半分の手がかりが得られるかもしれません。

Basic -> Periodic -> Application Integration framework -> Exceptions から取得できる AX の例外ログも見てください。

エラーの詳細を取得したら、問題を特定することができます。それ以外の場合は、ここに投稿してください。問題が何であるかをさらに調べます。

于 2011-07-04T23:02:55.163 に答える