Hi all experts,
I want to update sales opportunity. this is my code.
Dim oSO As SAPbobsCOM.SalesOpportunities
oSO = PublicVariable.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oSalesOpportunities)
oSO.GetByKey(11)
oSO.UserFields.Fields.Item("U_Priority").Value = "High"
oSO.UserFields.Fields.Item("U_CharOfReq").Value = "YES"
oSO.UserFields.Fields.Item("U_CorAcc").Value = "YES"
oSO.Lines.MaxLocalTotal = 123456
oSO.Lines.Add()
oSO.Remarks = "test wp"
lErrCode = oSO.Update()
When i click update, the sap returns "Cannot update closed row".
How can i correct this problem?
Thanks
TONY