You need to sign in to do that
Don't have an account?
Giancarlo Amati
Executing Apex Production generate 101 too SQL queries
Dear Team,
I need to trigger an APEX Trigger class only to a subset of Cases which oddly my APEX Batch class skipped.
In my production environment, I have opened the Developer Console window --> Open Execute Anonymous Window and pasted the following code. By calling 'update cc' I will trigger the Case Trigger. However, I get the error in the snapshot.
My questions:
1) How can I run my apex batch class ONLY on the cases that were missed?
2) Is there a way to call the Apex instruction without generating the "Too Many SQL Queries" message?
Thank you.
GC
I need to trigger an APEX Trigger class only to a subset of Cases which oddly my APEX Batch class skipped.
In my production environment, I have opened the Developer Console window --> Open Execute Anonymous Window and pasted the following code. By calling 'update cc' I will trigger the Case Trigger. However, I get the error in the snapshot.
My questions:
1) How can I run my apex batch class ONLY on the cases that were missed?
2) Is there a way to call the Apex instruction without generating the "Too Many SQL Queries" message?
Thank you.
GC
List<case> ccL = [SELECT CreatedDate, Met_SLA_2__c FROM Case WHERE ((CALENDAR_YEAR(CreatedDate) >= 2016) AND (Met_SLA_2__c = null) )]; System.debug('Size List: ' + ccl.size()); for (Case cc: ccL){ update cc; }
Thank you.
Hi
GhanshyamChoudhari, thank you but I don't see how that helps. Can you explain, please? In my production environment, I have a Case Trigger already working for new Cases. The value of Met__SLA__2__C is assigned from within the Case trigger. I don't want to assign any value manually. Will 'your values' be overwritten by the Case Trigger?
Thank you.
G
Bye
1 st run this code
clear Execute Anonymous Window
then run 2nd code