+ 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!

 

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

 


 

Message Edited by MiguelGuerreiro on 09-23-2009 01:54 PM
MiguelGuerreiroMiguelGuerreiro

Error is in this line:

 

 

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

 

Please, any help is appreciated!

 

Message Edited by MiguelGuerreiro on 09-24-2009 11:13 AM
cafe2cafe2
Did you ever figure out how to fix this problem or find a work around? I am considering downloading this app, but don't want to mess up my email-to-case functionality. We are currently very reliant on email-to-case.
MiguelGuerreiroMiguelGuerreiro
No not really. The problem seems to happen when you have a workflow rule on the email message object which performs some update on the parent case. My workaround was disable this workflow rules.
cpo87cpo87

Anyone found a solution for this?  It also appears to happen when you have a trigger set up on the Email Message object.  My error is similar...

 

Developer script exception : LastEmailDateTime : LastEmailDateTime: execution of AfterInsert  caused by: System.Exception: Too many SOQL queries: 22  Trigger.LastEmailDateTime: line 7, column 23