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
srikanth j 24srikanth j 24 

workflow and validation rule

I have one scenario by using validation rule i need to display error message on amount field like if amount > 10000 
and
by using workflow rule i need to update same amount field with rule criteria amount > 15000. which will take precedence first validation rule or workflow rule and why? how can i approach this one can anyone help me out with detail explanation.
Advance Thanks.
<- Deepak Rathinavelu -><- Deepak Rathinavelu ->
Hi Srikanth,

The validation rule would run first and then the work flow rule. Check out the order of execution.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm

In particular step 4 and step 10 in particular might be of your interest.

Regards
RD
Deepak agarwal 9Deepak agarwal 9
Hi Srikanth,

Validation rule will run first because the order of execution is:

Before Triggers,Validation Rules,After Triggers,Assignment Rules,Workflow Rules,Commit.

Thanks,
Deepak Agarwal.
 
Anuj Joshi 16Anuj Joshi 16
Hi srikanth

For the order of execution you can follow the link below

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm

Thanks,
Anuj Joshi