You need to sign in to do that
Don't have an account?
Derek Patrick Daya
Deactivating a Trigger issue
I have a trigger that I previously deployed on my production. It has 100% code coverage and did not have any problem with any of the triggers.
Recently with the updates done by the Third Party App, started experiencing error with our custom send email button on a VF page. It produces SOQL Limit error. Upon checking debug logs, we notice that my trigger is the one causing it. Now I am trying to deactivate it but without any success.
1. Deactivated trigger on Sandbox and deploy it to prod. we received Apex Heap Size error upon deploying.
2. Tried to uncomment out all the codes in test class and trigger, I still received the same error.
3. Used Force.com IDE, downloaded the trigger and change it there to inactive then deployed to server, same error is received. Heap Size error on 3 test classes on the production.
Did anyone experience same issues before? Can any shed some other ways to deactivate that trigger?
Recently with the updates done by the Third Party App, started experiencing error with our custom send email button on a VF page. It produces SOQL Limit error. Upon checking debug logs, we notice that my trigger is the one causing it. Now I am trying to deactivate it but without any success.
1. Deactivated trigger on Sandbox and deploy it to prod. we received Apex Heap Size error upon deploying.
2. Tried to uncomment out all the codes in test class and trigger, I still received the same error.
3. Used Force.com IDE, downloaded the trigger and change it there to inactive then deployed to server, same error is received. Heap Size error on 3 test classes on the production.
Did anyone experience same issues before? Can any shed some other ways to deactivate that trigger?
DerekSendUpdatesToApplicantsTestClass.DerekSendUpdatesToApplicants(), Details: System.LimitException: Apex heap size too large: 62615875 External entry point (AVTRRT)
same error on change sets and Force.com IDE
You can also take a look at the following links:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm
https://developer.salesforce.com/forums?id=906F00000008ztLIAQ
http://www.sundoginteractive.com/sunblog/posts/system.limitexception-apex-heap-size-too-large
Test Class:
@isTest(seeAllData=true)
private class DerekApplicantsWithActivityTestClass{
static testMethod void DerekCountApplicantsWithActivity() {
Date CurrentDate = Date.Newinstance(2014,11,12);
AVTRRT__Job__c a = new AVTRRT__Job__c();
a.AVTRRT__Job_Title__c = 'Sys Ad';
insert a;
Contact c = new Contact();
c.FirstName = 'Derek';
c.LastName = 'Daya';
c.Email = 'derekpatrickdaya@yahoo.com';
insert c;
AVTRRT__Job_Applicant__c b = new AVTRRT__Job_Applicant__c();
b.AVTRRT__Job__c = a.id;
b.AVTRRT__Contact_Candidate__c = c.id;
b.Last_Activity_Date__c = CurrentDate;
insert b;
}
}
Trigger:
trigger DerekCountApplicantsWithActivity on AVTRRT__Job__c (before update) {
for (AggregateResult ar : [
Select Count(Id) numRecs, AVTRRT__Job__c jobId
From AVTRRT__Job_Applicant__c
Where Last_Activity_Date__c != null and AVTRRT__Job__c In :Trigger.New
Group By AVTRRT__Job__c
]) {
Id jobId = (Id) ar.get('jobId');
AVTRRT__Job__c job = Trigger.newMap.get(jobId);
job.Number_of_Applicants_with_Activities__c = (Decimal) ar.get('numRecs');
}
}
seeAllData=false
It will make sure that your test class is not processing any data from your org.