Print this page

Validation Rules not enforced in the User Interface in Community for Guest Users but records are not created

Knowledge Article Number 000239893
Description Guest Users trying to use, for example, a Contact Us form in a Community are going to be able to submit records with a success error message even when the input data should have triggered a Validation Rule.
However, records will not be created in the system and we receive the following email:
Subject: There is an issue with This Case 

Salesforce could not create this case because of the reason listed below. We will try creating the case again. For more information about this error or help with Web-to-Case, please contact Customer Support. 

Reason: support.cases.WebToCaseException: Error code=FIELD_CUSTOM_VALIDATION_EXCEPTION, message=Hey Guest User! Enter a case reason, fields=[Reason] 

Record Information: 
_quickActionName = NewCase 
_record = {"Status":"Unassigned","Description":"Test Case Guest User with Validation Rule","Priority":"Medium","Reason":"","Subject":"Test Case Guest User with Validation Rule"} 

Thank you! 

Customer Support, inc. 
The Landmark @ One Market, Suite 300 
San Francisco, CA 94105 
Resolution This is currently working as designed.

The process of creating a case for Unauthenticated Users like the Guest User is different than the one in place for Authenticated Users.
All validation process, except checking for non-empty required fields in the form, is done on the server-side. For Guest Users these Case submissions don't have validation run until they are processed off of the queue. As you can see in the email with the error you receive, they're submitted as Web-to-Case records to Salesforce.

If you need to add validation criteria before Guest Users can submit cases in a Community you'd need to create a custom component to replace the standard Contact Us form.

promote demote