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

Assign Queue as Case Owner using Trigger
Hi. I am trying to assign a queue as the case owner.. In a Case Before Trigger, I am have the following. The case owner is getting updated if the abm__c field is populated.. however, it does not get updated with the queue if that field is null.
Account_Team__c at = aMap.get(c.AccountId);
// Only change the owner if the Account Team has
// an ABM and the ABM is an active user. Once assigned
// set the flag Assigned to ABM
if (string.isNotBlank(at.abm__c)) {
if (at.abm__r.IsActive) {
c.ownerid = at.abm__c;
c.Assigned_To_ABM__c = true;
}
}
else {
c.ownerid = abmQueue[0].Id;
}
Any help woudl be greatly appreciated!!
Fred
Account_Team__c at = aMap.get(c.AccountId);
// Only change the owner if the Account Team has
// an ABM and the ABM is an active user. Once assigned
// set the flag Assigned to ABM
if (string.isNotBlank(at.abm__c)) {
if (at.abm__r.IsActive) {
c.ownerid = at.abm__c;
c.Assigned_To_ABM__c = true;
}
}
else {
c.ownerid = abmQueue[0].Id;
}
Any help woudl be greatly appreciated!!
Fred
https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_queuesobject.htm
All Answers
https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_queuesobject.htm