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
Darshit Pathak 10Darshit Pathak 10 

Why Case assignment rules are fired automatically?

One batch is updating Case with some values.
Case trigger doesn't have any Database.DMLOptions code.
Checked in full trigger & related classes code and also not found any instance of DMLOPtions in debug log.
Still Assignment rules are getting executed and owner is changed.
2 weeks before it was not happening like this.Assignment rule was not getting fired.
Could anyone help with the possible root cause?
ANUTEJANUTEJ (Salesforce Developers) 
Hi Darshit,

Can you try reviewing the below links that could help address the above issue you are facing:

>>  https://jayakrishnasfdc.wordpress.com/2018/09/08/running-case-assignment-rules-from-apex/
>> https://help.salesforce.com/articleView?id=000338182&type=1&mode=1

In case if this comes in handy can you please choose this as the best answer so that it can be useful for others in the future.

Regards,
Anutej
Darshit Pathak 10Darshit Pathak 10

Thanks for the response.
But my question is not "how to run assignment rule from apex?".. that I know how to run from apex.
My actual issue is I have not implemented Database.DMLOption in my code, still when one batch updates case, assignment rule gets fired.
I am not expecting rules to fire.
Nowhere in batch code or trigger code Databse.DMLOption is there, still why assignment rules are getting fired that's the issue!!!

Bhargava MusunuriBhargava Musunuri

I have the same issue, Assignment rules are randomly firing for one User. Verified page layout settings, assignment and code. Any other things to check please suggest