function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
James BensonJames Benson 

[ERROR] Dependent class is invalid and needs recompilation

Hi,

I'm trying to deploy a trigger change using Force.com IDE and am receiving the following error:

Description    Resource    Path    Location    Type
line -1, column -1: Dependent class is invalid and needs recompilation:
 Class OpportunityLineItemTriggerHandlerTest : Method does not exist or incorrect signature: void sendEmail(Id) from the type CustomSalesInvoicePrintController    classfind        line 1    Force.com run test failure


I've done testing in our full sandbox and was able to update the following trigger without issue. I am unable to do the same when deploying for production. 

What's odd is that this trigger doesn't reference any other triggers and so I'm confused why the error code says it does. Here's the trigger code:
 
trigger LeadDomainMatch on Lead (before Insert,before update) {
    for (Lead leadInLoop : Trigger.new) {
   
if (leadInLoop.Domain__c != 'gmail.com' && leadInLoop.Domain__c != 'yahoo.com' && LeadInLoop.New_York__c == FALSE && LeadInLoop.New_Jersey__c == FALSE && LeadInLoop.Status == 'MQL' && LeadInLoop.Florida__c == FALSE) {
    // Retrieve owner from Account record based on email domain name
    list <Account> acct = [Select AMAOwnerID__c from Account WHERE Account_Email_Domain__c = :leadInLoop.Domain__c AND Account.Type = 'Customer' Limit 2];
    
        if (acct.size() == 1) {

    //the next line is for debugging, to check that you are getting a result back from the query
            System.debug('account owner id is: ' + acct[0].AMAOwnerID__c);
    leadInLoop.OwnerId=acct[0].AMAOwnerID__c;
        }
    }
}
}

All I'm trying to change is 'AMAOwnerID__c' to 'Pro_Associate_ID__c' (a field that already exists in production).

Any help would be appreciated!
James

 
Raj VakatiRaj Vakati
Can you check the OpportunityLineItemTriggerHandlerTest  test class .. Issue is in the test class 
Looks like you are invoking "CustomSalesInvoicePrintController" in the above test class and sendEmail method is called from the test class which is not available in CustomSalesInvoicePrintController apex class. 
James BensonJames Benson
Hi Raj!

I can definitely do that. My issue with this error is that the trigger I'm updating has nothing to do with the objects "Sales Invoice" or "Opportunity Line Items". It only deals with leads. 

(this isn't your fault in the configuration of eclipse or Force.com IDE) - but I'm curious why these classes are even queried. 

Does that make sense?

Thank you!
James