Reputation: 291
I am raising a warning message on a field in its FieldUpdating event handler, but it is displaying and behaving like an error instead of a warning. In other words, red instead of yellow icon, and turns the field value red. Any ideas why it might be behaving like this? Below is the exception being thrown. I have also tried sender.RaiseExceptionHandling, and putting this in the FieldVerifying instead, but it still shows as error.
throw new PXSetPropertyException(string.Format("Instead of using this description, consider using the existing description: '{0}'",
closestFound.Key.Description, PXErrorLevel.Warning));
Upvotes: 0
Views: 117
Reputation: 291
I was able to get it to behave like I want by using PXUIFieldAttribute.SetWarning instead of raising an error. Maybe PXErrorLevel.Warning doesn't actually behave like a warning, not sure.
Upvotes: 1