Dynamics ax 2012 AIF日期不接受

时间:2017-05-20 07:19:53

标签: dynamics-ax-2012 x++ aif

继续接收这样的异常消息“从XML读取Date类型的值时出错”。使用aif插入销售订单时。这是我的代码。

   //string deliverdt = "19/05/2017";

DateTime date = DateTime.ParseExact(deliverdt, "dd/MM/yyyy", null);

AxdEntity_SalesTable salesTable = new AxdEntity_SalesTable();
salesTable.CurrencyCode = "USD";
salesTable.CustAccount = "C-000003";
salesTable.DeliveryDate = new DateTime(2017, 5, 19); // Convert.ToDateTime("19/05/2017"); //System.DateTime.Now; 
// salesTable.DeliveryDate = Convert.ToDateTime(dt);
//Convert.ToDateTime("5/19/2017");
salesTable.Payment = "N07";
salesTable.PurchOrderFormNum = "PO";

AxdEntity_SalesLine salesLine = new AxdEntity_SalesLine();
salesLine.ItemId = "A3300-HV";
salesLine.SalesQty = 1;
salesLine.SalesUnit = "ea";
salesLine.SalesPrice = 2000;

提前感谢。

2 个答案:

答案 0 :(得分:0)

您是否尝试过Test_Table

.NET wrapper为值类型创建指定的属性。

答案 1 :(得分:0)

就我而言,它足以满足字段salesTable.ReceiptDateRequested