I enabled the "Create Case from Email" feature, but I receive many duplicate emails every day. I want to block the Case creation when the incoming email is a duplicate.
I tried adding the following line in Before Save Custom Script:
throw("Duplicate record detected. Creation prevented.");
However, this does not prevent the Case from being created.
How should I properly block the creation of a Case record (including those created from inbound emails)?
Which script or formula should I modify, and where should I place the logic?
Any advice would be appreciated.

Comment