Loading

Web-to-Case and Web-to-Lead generating multiple undesired records

Publiceringsdatum: Apr 3, 2026
Beskrivning
Spam attacks can originate from a number of undesired records (Cases, Leads) coming from our Web-to-X features. You can prevent records from being created in the Case and Lead objects.
Lösning

You could use a Report and filter by Creation Date or use key fields or suspicious email addresses to detect 'spam' records and delete them.
However, if your goal is to stop them and prevent the creation of the records you could create a Validation Rule.

To create the Validation Rule please navigate to Setup | Cases or Leads | Validation Rules  and click the New button.
Make sure to add a Rule Name and the desired Error Message. Also, within the Error Condition Formula place the following example below:
 

AND(ISPICKVAL(LeadSource,"Web"),CONTAINS( Email , "test@test.com"))

NOTE: Use 'Origin' or 'LeadSource' if you're using Web-to-Case or Web-to-Lead respectively.


You may want to amend the Formula to cover the fields and values you consider relevant for your business. Once you are satisfied with the Validation Rule definition please make sure the Active checkbox is checked.
You can test this out on a Sandbox first to make sure it blocks only the Leads/Cases that you want to block.

Note: When the validation rule is active in Production, the user in “Default Lead Creator” under Setup - Lead Settings will receive 1 email per failure. It is advised that user’s email is only for testing purposes to prevent huge volume of spam emails.

 

Knowledge-artikelnummer

000387077

 
Laddar
Salesforce Help | Article