Skip to main content

Hello!

Currently, if a PXSetPropertyException is thrown from the FieldVerifying event, the error is packaged up nicely for the specific field under an “error” property on the field in the response with a status code 422.

 

What I’d like to do is validate multiple fields on an SO Line using the RowUpdating/Inserting/Deleting events, and if a field fails validation have the response come back in that same way.

 

Based on the framework docs I’ve tried this on the SO line, but the response comes back with status code 500:

sender.RaiseExceptionHandling<SOLine.inventoryId>(
line, line.InventoryId,
new PXSetPropertyException("failed validation."));
e.Cancel = true;

Is this even possible or does it require that the PXSetPropertyException be thrown from the FieldVerifying event?

Be the first to reply!

Reply