Skip to Content
0
Former Member
Nov 01, 2012 at 11:00 AM

Cannot update closed row [OPR1.Line][line: 1]

145 Views

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