Skip to main content
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
3 Antworten