Is it possible to write a "/C" comment line item to a sales order using BOI? If so how? The VB code I am currently using is more or less this modulo checking response codes and logging:
Dim oSOrder As Object
Dim sItemCode As String
Dim sQuantityOrdered As String
Dim sUnitPrice As String
Dim sCommentText As String
'Fill in code to connect to sage, initialize oSOrder, and pull in values for fields here
'...
oSOrder.oLines.nAddLine()
oSOrder.oLines.nSetValue("ItemCode$",sItemCode)
oSOrder.oLines.nSetValue("QuantityOrdered",CInt(sQuantityOrdered))
If Not (sUnitPrice = "") Then
oSOrder.oLines.nSetValue("UnitPrice",Double.Parse(UnitPrice))
End If
If Not (sCommentText = "") Then
oSOrder.oLines.nSetValue("CommentText$",sCommentText)
End If
oSOrder.oLines.nWrite()
(Here fields are dimed as strings because of how data is retrieved from external sources)
The above works fine with a regular item
e.g. sItemCode = "SKU" , sQuantityOrdered = "1", sUnitPrice = "10", sCommentText = "This is a comment"
but when I try
sItemCode = "/C", sQuantityOrdered = "0", sUnitPrice = "", sCommentText = "This is a comment"
I get an error at the oSOrder.oLines.nWrite() line :"The 023530300000100000000000001 is invalid." I believe that this number is something like [OrderNumber][LineKey][LineSeqNo], thus all it is telling me is that the line I'm trying to write is invalid. So... How do I make it valid? Incidentally I've also tried writing a UnitPrice and not writing a QuantityOrdered to the line, but I still get the same error.
Thanks