2011-06-03 55 views
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服務引用)。

回答

1

查看Web服務和AOS所在的服務器上的事件日誌。 你可能會從那裏得到一半的線索。

也可以看看在異常日誌AX,你可以從 基本得到 - >週期性 - >應用集成框架 - >例外

一旦你得到了錯誤的信息,那麼你可能會以其他方式找出問題張貼他們在這裏,我進一步看看問題可能是什麼。

相關問題