I am trying to insert a case in apex and set the owner to a specific user id.
However active assignment rules are rerouting the case.
In apex, how would I disable the use of active assignment rules upon insert as you can on the default case creation.
In the case history I can see the owner is going to the user id I set, but the assignment rule changes it on creation.
activeCase.OwnerId = createCaseOwnerId;
insert activeCase;
Best Answer
You have to disable the case assignment while inserting. You can do that using DMLOptions.