I have implemented an AutoManaged UDO based matrix following (Thank you, Edy!). The first column (#) is bound to field DocEntry of my Master Data Table. Since the AutoManaged matrix contains no new line to enter additional records, I have implemented this functionality in the OnCustomInitialize method this way:
Matrix0.AddRow(); Matrix0.ClearRowData(Matrix0.RowCount); int docEntry = (Matrix0.RowCount == 1) ? 1 : Convert.ToInt32(((EditText)Matrix0.Columns.Item(0).Cells.Item(Matrix0.RowCount - 1).Specific).Value) + 1; ((EditText)Matrix0.Columns.Item(0).Cells.Item(Matrix0.RowCount).Specific).Value = Convert.ToString(docEntry);
But when I want to store the new line after entering all mandatory data, SBO says that the data have been changed by another user or operation.
1. Is there any way to make SBO handle the DocEntry values?
2. Is it correct to add new lines during initialization (OnCustomInitialize) and after update procedure (DataLoadBefore)?
3. Do I have to remove the new line when the user changed data but did not add new data, within the update procedure (ClickBefore)?