You need to sign in to do that
Don't have an account?

Default Case Owner Overriding Trigger Assignment
Hi All,
I have a trigger on attachment object to update the case owner based on the attachment type.
But the owner is being reassigned to case default owner (under Support Settings)
I have tried the dml options but it didn't work.
Any pointers/workarounds will be highly appreciated.
Many thanks in advance
I have a trigger on attachment object to update the case owner based on the attachment type.
But the owner is being reassigned to case default owner (under Support Settings)
I have tried the dml options but it didn't work.
Any pointers/workarounds will be highly appreciated.
Many thanks in advance
You can make use of DMLOptions assignmentRuleHeader
Can you try the following:
As mentioned, I have already tried that. But it didn't work.
The Support Setting default case owner is overriding whatever I give in the code.
I can see in the case history the owner being assigned by the trigger,but it is being overriden by theCase Default owner in the support setting.
Any pointers will be helpful
Many Thanks
create a check box in case “Owner updated by attachment type?”
set this checkbox to true on the attachment trigger when you set the owner.
In the assignment rule entry criteria, Check if the ”Owner updated by attachment type?” is false. By this way you can exclude the case from trigerring the assignment rule. Let me know if you are still facing issue
I have tried your suggestion, but that didn't work.
To give you more context, I'm using Email-to-Case functionality to create the Case.
The checkbox field “Owner updated by attachment type?” is getting set to true,
The owner is also getting set but it is getting overriden NOT by ASSIGNMENT RULES, but by SUPPORT SETTING DEFAULT CASE OWNER.
I tried deleting all the assignment rules, It didn't work then also.
Unfortunately I cannot leave this Support Setting Default Case Owner blank.
It is a mandatory field.
Any pointers will be helpful.
Many Thanks
I have done all of them.
Infact everything is getting reflected also. But the case owner is getting overridden by the Support Setting.
Not sure how to prevent that from happening.
Many Thanks
https://salesforce.stackexchange.com/questions/40507/case-default-owner-is-overriding-specified-case-owner
1. create Case assignment rule step,
2. In condition, add- "Case: Case Owner EQUALS <new owner to be updated>" and any condition if needed.
3. Under 'Select the User...' section, mark the checkbox - 'Do Not Reassign Owner'
4. Save.
Now, Default owner will not be updated, whenever you are trying to update owner from the trigger.
2. In condition, add- "Case: Case Owner EQUALS <new owner to be updated>" and any condition if needed.
So you 're adding a condition that the Case Owner equals the original owner (the default owner named in support settings)?
For me, when I click 'Do Not Re-Assign", it blanks out the new owner I have chose in the rule...do you k now how to get around that?
- Create a field "Actual user assigned" in Case
- Create a trigger that populates that field according to the criteria (in my program, simple round robin)
- Create a process in PB to
- Fill the OwnerId with the actual user assigned field
- Put the actual user assigned to null (optional)
It actually worked for me!Please feel free to ask me for more details.
Best!
1. Add a new step to the existing case assignment rule (or create a new rule, if there isn't already one).
2. Give the new step the order number "number of existing entries + 1" (e.g. if you have 1 entry already, type in "2" as order number for the new step).
3. In the new step, fill the criteria fields with "Case: Case Owner" / equals / "name of owner not to be overwritten" (replace "name of owner not to be overwritten" with the owner name that should not be overwritten with standard case owner; DO NOT use the API names here, but fill in the owner names, e.g. if you want to insert a queue with the name "Test Queue" and API name "Test_Queue" as value for the criteria mentioned above, use the name "Test Queue").
4. Repeat step 3 until all case owners you don't want to be overwritten by standard case owner are listed.
5. Add a custom filter logic for all listed case owners with the "OR" operator, e.g. if you have three criteria fields/owners in your list, type in "1 OR 2 OR 3" in the filter logic field.
6. Final step: It's essential that the checkbox "Do Not Reassign Owner" is checked, because the case owners in the criteria list aren't overwritten with the standard case owner ONLY when this checkbox is checked.
7. Save the new step so that it will become active.
Thanks again Richy Eva1 for your solution :-)