+ Start a Discussion
Eran VizelEran Vizel 

Values from trigger do not affect assignment rules?


I have a complicated assignment rule for cases which I use a before trigger to assign the case to.
I also use case assignment rules.
Problem is, I want the apex rule to be stronger than the assginment rules, yet the order of execution is triggers before assignment rules.

I try to put a condition in the validation rule saying current owner name should not be the one given in the apex trigger, in order to obey this assignment rule.
However it doesn't work. Could it be that the value put within the trigger is still not commited to the database at the assignment rule stage, thus does not get filtered?

Thank you,
Hi Eran,
You can create a hidden field on your case object and populate that field with true/false in you trigger code and use that field to drive if your trigger assignment should take precedence over your assignment rule.

Fahad Akhtar