I am using an ultra grid to add rows to the UD06 table. That all works great. By design I do not want key fields to be duplicated which Epicor manages fine. My issue is when a key field is duplicated, I get a system contraint exception. I would like to replace this exception with a user friendly exception. Does anyone know what event I would need to expose to capture this and what the syntax would be?
Error:
Exception caught in: System.Data
Error Detail
Message: Column ‘Company, Key1, Key2, Key3, Key4, Key5’ is constrained to be unique. Value '1001, M15819, 50, , , ’ is already present.
Program: System.Data.dll
Method: CheckConstraint
Thanks