create sales order using and Axapta Business Connector

Hi All,

as the title says i am trying to create a sales order using .net business connector (VB) here is the code snippet:


If MsgBox(“Upload SO record to Axapta?”, MsgBoxStyle.YesNo, “System Message”) = MsgBoxResult.Yes Then
’ Sales Order Header
salesHeader = ax.CreateAxaptaObject(“AxSalesTable”)
salesHeader = salesHeader.Call(“construct”)
salesHeader.Call(“parmCustAccount”, “C-FG0001”)

’ Sales Order Lines
salesLine = ax.CreateAxaptaObject(“AxSalesLine”)
Dim sid As String = salesHeader.Call(“parmSalesID”).ToString
salesLine.Call(“parmSalesID”, sid)
salesLine.Call(“parmItemId”, “5S-ACOBOA010”)
salesLine.Call(“parmInventDimId”, “10”)
’ Dimensions/Warehouse

MsgBox(“SO Uploaded!”)
End If
Catch ex As Exception
End Try

works find but i cant seem to fill in the field warehouse thus i get an error

“Inventory Dimension Site is mandatory”

of course im pretty new with Axapta development specially using .net business connector so pardon the question. hope somebody could help out. thanks a lot :slight_smile:


any input guys?

use dataset and access item like this



Hi RJ,

From error message, it appears that the InventDimID that you are sending is incorrect. Please correct the same.

Also if you haven’t already done so, try to create sales order manually in AX using this data.