In my acumatica application, I created a custom page where the user needs to insert data in the grid section. In order to validate the provided data, I implemented the RowInserting and RowUpdating Events.
The problem is that in the rowinserting event I first throw an error using the following code:
cache.RaiseExceptionHandling<DZField.size>(fieldLine, fieldLine.Size,
new PXSetPropertyException(string.Format(ValidationMessages.FIELD_NOT_VALID_FORMAT,
"Size"), PXErrorLevel.RowError));
Then I set the e.Cancel property to true. But when the user changes the incorrect value and re-triggers the event, the row will have missing values which were not manipulated in the event.
I also tried to not set the e.Cancel property and instead throw a PXException, but even in this case other values in the row were reset.