1
需要在vb.NET aspx頁面中使用AX 2009 ReturnOrderInService Web服務的創建方法在AX中創建RMA。vb.Net代碼使用AX 2009 ReturnOrderInService Web服務
我在下面寫的代碼創建了AX中的RMA,但不顯示AX RMA表單中的行詳細信息,即使記錄位於SalesTable和SalesLine中。
InventTrans中是否需要記錄或某處是否缺少InventRefId值?
Dim rmaClient As ReturnOrderInServiceClient = New ReturnOrderInServiceClient("WSHttpBinding_ReturnOrderInService1")
Dim roi As AxdReturnOrderIn = New AxdReturnOrderIn
Dim st As AxdEntity_SalesTable = New AxdEntity_SalesTable
st.CustAccount = "123"
st.ReturnReasonCodeId = "RRC1"
st.DlvMode = "01"
st.SalesType = 4 'return item
st.ReturnDeadline = DateAdd(DateInterval.Day, 15, Now())
Dim sl As AxdEntity_SalesLine = New AxdEntity_SalesLine
sl.ItemId = "ITEM 123"
sl.ExpectedRetQty = -2
sl.LineAmount = 0
sl.InventTransIdReturn = ""
st.SalesLine = New AxdEntity_SalesLine() {sl}
roi.SalesTable = New AxdEntity_SalesTable() {st}
txtFeedback.Text = ""
Try
Dim returnedSalesOrderEntityKey As EntityKey() = rmaClient.create(roi)
Dim returnedSalesOrder As EntityKey = CType(returnedSalesOrderEntityKey.GetValue(0), EntityKey)
txtFeedback.Text = GetRMANo(returnedSalesOrder.KeyData(0).Value)
Catch ex As Exception
txtFeedback.Text = ex.Message
End Try
rmaClient.Close()
能幫你更具體的你的目標和手段? –
目標是能夠使用Web上的aspx頁面(用vb.net編寫)在AX2009中啓動/創建RMA訂單。我有一個創建銷售訂單(使用C#而不是VB)的例子,但找不到創建RMA的示例。無法將所有C#語法都轉換爲VB並使其工作。 – Don
你能鏈接到銷售訂單的例子嗎?你能解釋一下C#語法不能轉換爲VB嗎? –