Is it possible to customise the server error message that shows up from a unique index when a user tries to enter a duplicate entry? Besides duplicating the validation (with if statements) on the create or update actions - is it possible to just customise that error somewhere, could not find any options on the index settings.

Hi,

Did you try to customise OnException event?


Hi André,

Please check this document, where you found how you can customize some erros.

Cheers

Miguel Verdasca wrote:

Hi André,

Please check this document, where you found how you can customize some erros.

Cheers

Thanks, I did find that but this is for mobile only.


Daryna Kravets wrote:

Hi,

Did you try to customise OnException event?


That is not specific to the index it will throw the same message for all database exceptions errors, including bad data types etc and if using CRUD then this will be applied to all apps using that action (so it would have to be a generic message anyway). I don't think there is a solution other than mimicking that validation on "save" to provide the user with specific message for the duplicate entry.

I will add as an idea... but I guess this is really unimportant.