2011-06-03 54 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,你可以从 基本得到 - >周期性 - >应用集成框架 - >例外

一旦你得到了错误的信息,那么你可能会以其他方式找出问题张贴他们在这里,我进一步看看问题可能是什么。

相关问题