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
magdamagda 

HELP!!! Trigger running for validation rules

Hi i created last week validation rules. And they was running.
Today they are not more running.



The Problem is I added a trigger befor insert, and salesforce first try the trigger and after that the validation rules.
What can I do to impose Force.com to test first validation rules and after that to run may trigger?

Do you have an Idea?
Thx

Magda


Message Edited by magda on 03-06-2008 03:14 AM
London BenLondon Ben
Hi Magda,
 
First - the order of triggers/validation/workflow is set in SF and follows the following process:
 
1. Before triggers
2. System validation occurs, verification of required fields along with any user-defined
validation rules
3. After triggers
4. Assignment rules
5. Auto-response rules
6. Workflow rules
7. Escalation rules
8. Post-commit logic (such as sending emails etc)
 
So - it would seem - that it may work for you to simply change your 'before' trigger - to an 'after' trigger ?
 
Unless there is some complexity that you've not revealed in your question?
 
Good luck!
 
Ben

 

magdamagda
Hi,
thx for your answer...

But my trigger need to be a before trigger, because i change a value of an object field....


I find the solution.............
Add a condition to change the value....

And the trigger change the value of the field only if the condition is TRUE

Thank you

It was a very easy Problem...


Message Edited by magda on 03-06-2008 04:54 AM