Ask Search:
Natasha TanNatasha Tan 

Apex Trigger

Dear Sir/Madam,

When I enter an opportunity into salesforce and go to add a product, this error comes up:

Apex trigger UpdateOpportunityLineItemPrice caused an unexpected exception, contact your administrator: UpdateOpportunityLineItemPrice: execution of BeforeInsert caused by: line 58, column 13: Dependent class is invalid and needs recompilation: Utility: line -1, column -1: Method 'DoCodeCoverage' exceeds the maximum number of allowed op codes. Please break this method into multiple, smaller methods. 

Please could you get back to me asap as this problem is preventing my colleagues from generating quote numbers and holting business.

Many thanks,

Karanraj SankaranarayananKaranraj Sankaranarayanan
Hello Natasha,

You have custom apex trigger code on Opportunity, with the name UpdateOpportunityLineItemPrice 
The error is due to that Apex trigger code.
Kindly cotact your developer team regarding this error.
Charan VuyyuruCharan Vuyyuru
Form this trigger, you are calling an apex class and a method named DoCodeCoverage.

Try editing this class and save again. The class needs to be  recompiled.

As Karan suggested, please do contact your Dev Team if you are not a developer.

Andres Perez (Inactive)Andres Perez (Inactive)
You'll need to edit, save on sandbox and then deploy.