Skip to Content
0

Invalid Row Error on Updating Sales Quotation Lines

Apr 25 at 01:54 PM

22

avatar image
Former Member

I have this code where I get an error "Matrix - Invalid Row Number" when I am trying to update multiple rows of a sales quotation.

I have a UDF that pulls SAP quotation data, a user can make edits and save back to the DB.

What am I doing wrong?

if (_cmbType.Selected.Value == "Item")
{
sboSQ.DocType = SAPbobsCOM.BoDocumentTypes.dDocument_Items;

int cnt = oIMatrix.VisualRowCount;

// Add the lines
// Iterate through the item matrix rows
for (int i = 0; i <= oIMatrix.VisualRowCount - 1; i++)
{
sboSQ.Lines.SetCurrentLine(i);
sboSQ.Lines.ItemCode = ((SAPbouiCOM.EditText)oIMatrix.GetCellSpecific("iV_0", i)).Value;
sboSQ.Lines.Quantity = double.Parse((oIMatrix.GetCellSpecific("iV_2", i)).Value);
sboSQ.Lines.UnitPrice = double.Parse((oIMatrix.GetCellSpecific("iV_4", i)).Value);
sboSQ.Lines.DiscountPercent = double.Parse((oIMatrix.GetCellSpecific("iV_5", i)).Value);
sboSQ.Lines.TaxCode = ((SAPbouiCOM.ComboBox)oIMatrix.GetCellSpecific("iV_6", i)).Value;
sboSQ.Lines.LineTotal = double.Parse((oIMatrix.GetCellSpecific("iV_7", i)).Value);
sboSQ.Lines.WarehouseCode = ((SAPbouiCOM.EditText)oIMatrix.GetCellSpecific("iV_9", i)).Value;
}
}

Regards,

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers