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
BegginerBegginer 

which one executes first among the two, Visual force page field update or workflow field update?

thanks in advance. 
Best Answer chosen by Begginer
gopi biswalgopi biswal
I think Visualforce field update, As Workflow field update is after any DML happens. But Visualforce update has no dependency.

All Answers

NagendraNagendra (Salesforce Developers) 
Hi Beginner,

Please check with below link which helps you with above requirement. Please let us know if this helps.

Best Regards,
Nagendra.
gopi biswalgopi biswal
I think Visualforce field update, As Workflow field update is after any DML happens. But Visualforce update has no dependency.
This was selected as the best answer
Anilkumar KotaAnilkumar Kota
Hi ,
Order of execution in Salesforce
  1. 1. The original record is loaded from the database (or initialized for an insert statement)
  2. 2. The new record field values are loaded from the request and overwrite the old values
  3. 3. All before triggers execute (TRIGGERS)
  4. 4. System validation occurs, such as verifying that all required fields have a non-null value, and running any user-defined validation rules (VALIDATIONS)
  5. 5. The record is saved to the database, but not yet committed
  6. 6. All after triggers execute
  7. 7. Assignment rules execute
  8. 8. Auto-response rules execute
  9. 9. Workflow rules execute (WORKFLOW)
  10. 10. If there are workflow field updates, the record is updated again
  11. 11. If the record was updated with workflow field updates, before and after triggers fire one more time (and only one more time)
  12. 12. Escalation rules execute
  13. 13. All DML operations are committed to the database
  14. 14. Post-commit logic executes, such as sending email

For More information 

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