We are having one huge class , which is around 1500 lines of code in it and contains only one method.
now when we are trying to add any new code in methhod it shows compile error as below
Compile Error : Method exceeds maximum number of allowed op codes, please break this method into multiple ,smaller methods.
Does is there any limit for code length in class function.
Any help will be apritiated .
I have an opportunity that I would like to undelete. I can find the data in the database using both Apex Explorer and through an APEX query if I use the ALL ROWS flag. I understand how to undelete using the apex command Undelete:
id OppId = '0068000000VVkwlAAD';
Opportunity opp = [select id, name from opportunity where id =: OppId ALL ROWS];
Database.UndeleteResult result = Database.Undelete(opp, false);
But... this record is not in the recycle bin. I get an error:
|USER_DEBUG|[5,1]|DEBUG|Database.UndeleteResult[getErrors=(Database.Error[getFields=();getMessage=Entity is not in the recycle bin;getStatusCode=System.StatusCode.UNDELETE_FAILED;]);getId=0068000000VVkwlAAD;isSuccess=false;]
So the data is in the system... I just want to flip the isdeleted flag... Can I do this?