+ Start a Discussion
MiguelGuerreiroMiguelGuerreiro 

Case Age In Business Hours

Hello,

 

Anyone using Case Age In Business Hours package from appexchange is having problems with Email2Case?

 

We're getting a lot of errors because of too many SQL queries...

 

Thank you for any help!

 

 

 

Log file:

 

 

2009-09-23 13:45:36,770 145373 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:0: CalculateBusinessHoursAges: execution of BeforeUpdate caused by: System.Exception: Too many SOQL queries: 21 Trigger.CalculateBusinessHoursAges: line 20, column 32 2009-09-23 13:45:36,792 145395 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:1: CalculateBusinessHoursAges: execution of BeforeUpdate caused by: System.Exception: Too many SOQL queries: 21 Trigger.CalculateBusinessHoursAges: line 20, column 32 2009-09-23 13:45:36,792 145395 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:2: CalculateBusinessHoursAges: execution of BeforeUpdate caused by: System.Exception: Too many SOQL queries: 21 Trigger.CalculateBusinessHoursAges: line 20, column 32 2009-09-23 13:45:36,792 145395 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:3: CalculateBusinessHoursAges: execution of BeforeUpdate caused by: System.Exception: Too many SOQL queries: 21 Trigger.CalculateBusinessHoursAges: line 20, column 32 2009-09-23 13:45:36,792 145395 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:4: CalculateBusinessHoursAges: execution of BeforeUpdate caused by: System.Exception: Too many SOQL queries: 21 Trigger.CalculateBusinessHoursAges: line 20, column 32 2009-09-23 13:45:36,792 145395 [Timer-0] INFO com.sforce.mail.GenericClient - Copying 5 messages to error mailbox 2009-09-23 13:46:21,784 190387 [Timer-0] INFO com.sforce.mail.GenericClient - Wed Sep 23 13:46:21 WEST 2009:Success:0 ID=02s20000002VbynAAC Success=true 2009-09-23 13:46:21,784 190387 [Timer-0] INFO com.sforce.mail.GenericClient - Wed Sep 23 13:46:21 WEST 2009:Success:1 ID=02s20000002VbyoAAC Success=true 2009-09-23 13:46:21,784 190387 [Timer-0] INFO com.sforce.mail.GenericClient - Wed Sep 23 13:46:21 WEST 2009:Success:2 ID=02s20000002Vc2DAAS Success=true

 

 

The line that gives the error is:

 

 

for (CaseStatus status:[Select MasterLabel From CaseStatus where IsClosed=true]) { closedStatusSet.add(status.MasterLabel); }