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
Eran VizelEran Vizel 

Values from trigger do not affect assignment rules?

Hi,

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,
Eran
Fahad-AkhtarFahad-Akhtar
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.

Thanks,
Fahad Akhtar