Skip to Content
avatar image
Former Member

Invalid Row Error on Updating Sales Quotation Lines

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,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers