function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Arash RahnArash Rahn 

Admin question sample

50) Under which three conditions should a validation rule be used to prevent invalid data? Choose 3 answers

a.            When records are edited by a user
b.            When records are deleted by a user
c.             When records are submitted using web-to-lead
d.            When records are imported
e.            When records are updated by a workflow rule

I saw some say c is part of the answer while some say e.

 
Andrew GAndrew G
My take on the answer

a,c,d

Reviewing workflow considerations:
https://help.salesforce.com/articleView?id=workflow_rules_considerations.htm&type=5

Salesforce processes rules in the following order:
  1. Validation rules
  2. Assignment rules
  3. Auto-response rules
  4. Workflow rules (with immediate actions)
  5. Escalation rules
So validation rules run before Workflow rules

Then reviewing order of execution help file:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm

13. If the record was updated with workflow field updates, fires before update triggers and after update triggers one more time (and only one more time), in addition to standard validations. Custom validation rules, flows, duplicate rules, processes, and escalation rules are not run again.

So basically, the workflow rule will not trigger the Custom Validation.

Thats my take, happy for other input. 

Regards
Andrew
Andrew GAndrew G
Oh, and to support my claim to c:

https://www.techguyswhogetmarketing.com/blog/2014/01/stop-spam-leads-salesforce-web-to-lead/

Regards
Andrew