How can I prevent a Case record from being created?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lj4353
    Senior Member
    • Nov 2023
    • 160

    #1

    How can I prevent a Case record from being created?

    Click image for larger version

Name:	image.png
Views:	0
Size:	150.3 KB
ID:	123308
    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.
  • heint
    Member
    • Jun 2025
    • 49

    #2
    Greetings, lj4353,

    I assume that this link can be helpful for you: https://docs.espocrm.com/development/duplicate-check/.

    Comment

    Working...