While not related to PXSetPropertyException I'm sharing this way of clearing errors and warning using 'null' as it may be useful to other looking to clear error and warning symbols:
PXUIFieldAttribute.SetWarning<DAC.Field>(cache, dacRecord, null);
PXUIFieldAttribute.SetError<DAC.Field>(cache, dacRecord, null);
You can achieve similar results to clear all records error with:
PXUIFieldAttribute.SetWarning<DAC.Field>(cache, null, null);
PXUIFieldAttribute.SetError<DAC.Field>(cache, null, null);
EDIT:
Check if using that pattern instead of PXSetPropertyException could help.
The key is to call SetWarning/SetError on each call with either null (no error) or with the error message.
protected virtual void DAC_FIELD_FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e)
{
DAC dacRecord = e.Row as DAC;
if (dacRecord != null)
{
bool isError = [your error condition];
if (isError)
{
dacRecord.Field = null;
}
PXUIFieldAttribute.SetError<DAC.field>(sender,
dacRecord,
isError ? "Error Message" : null);
}
}