on 03-20-2009 8:52 AM
I have the following code and encounter the error message "Not a valid open sales order [OWOR.OriginAbs]
Dim oWO, oWo2 As SAPbobsCOM.ProductionOrders
Dim xmlDoc As New System.Xml.XmlDocument
oWO = DirectCast(oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductionOrders), SAPbobsCOM.ProductionOrders)
oWo2 = DirectCast(oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductionOrders), SAPbobsCOM.ProductionOrders)
Dim s As String = "c:\2334.xml"
If (oWO.GetByKey(34)) Then
oWO.SaveXML(s)
oWO = Nothing
oWo2 = oCompany.GetBusinessObjectFromXML(s, 0)
Dim i As Integer = 0
i = oWo2.Update()
If (i <> 0) Then
MsgBox(oCompany.GetLastErrorDescription)
End If
End If
Does anyone have any idea why does this so?
Thanks
Hwee Yee Eng,
The issue can solve after remove Note OriginAbs in the xml file, seems a SDK issue.
Maybe you can update Product order directly but not use xml to avoid this issue.
Best Regards
Jane Jing
SAP Business One Forums team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Jane Jing
Thanks for the update, it solve my problem.
I use XML because i might need to remove some production order line in my SDK but DI doesn't provide the method to remove production order line.
Anyway, thanks for your help.
Regards
Hwee Yee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Jane Jing
I am able to open that production order in B1 and there is no link between production order and sales order. Does this mean link between Sales Order and Production Order have problem?
I managed to update Production Order Remarks in B1 and there should be no problem if i update through DI.
Does it make sense?
Please advice
Regards
Hwee Yee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Hwee Yee Eng,
By the error seems the Sales Order linked with the Order has problem,
you could check if can open the order in the B1 application.
Best Regards
Jane Jing
SAP Business One Forums team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.