When we see order of exceution of we find below mentioned behaviour:
First executes all before triggers--> then executes all after triggers-->then executes workflow rule 1)If there are workflow field updates, updates the record again. 2)If the record was updated with workflow field updates, fires before and after triggers one more time (and only one more time), in addition to standard validations. Custom validation rules are not run again.
Note: The before and after triggers fire one more time only if something needs to be updated. If the fields have already been set to a value, the triggers are not fired again.
First executes all before triggers--> then executes all after triggers-->then executes workflow rule
1)If there are workflow field updates, updates the record again.
2)If the record was updated with workflow field updates, fires before and after triggers one more time (and only one more time), in addition to standard validations. Custom validation rules are not run again.
Note: The before and after triggers fire one more time only if something needs to be updated. If the fields have already been set to a value, the triggers are not fired again.