You need to sign in to do that
Don't have an account?
Marry Stein
Apex Trigger: handle validation rules
Hello guys,
i am looking for the best way to handle validation rules in apex triggers. Sometimes i want to execute some dml actions after the record is validated.
Is it possible to query all my validation rules and extract the error condition ? i don't want to translate my validation rules into apex and i am pretty sure, that there is better way to do that.
Another option is to translate all my validation rules into apex methodes to receive a boolean. So it would be possible to use them in classes and triggers.
I hope you will understand my concers and i am appreciate your help !
i am looking for the best way to handle validation rules in apex triggers. Sometimes i want to execute some dml actions after the record is validated.
Is it possible to query all my validation rules and extract the error condition ? i don't want to translate my validation rules into apex and i am pretty sure, that there is better way to do that.
Another option is to translate all my validation rules into apex methodes to receive a boolean. So it would be possible to use them in classes and triggers.
I hope you will understand my concers and i am appreciate your help !
Can you give some example. why to wan to do validation in apex triggers when validation rules are there - is it complex validation? can you post your problem statement and code.
Thanks,
Manas