+ Start a Discussion
Stanley YeStanley Ye 

Test method hitting Internal Salesforce Error: 694469977-8690 (1545795159) (1545795159)

I'm now working on an custom controller and vf pages that will override standard opportunity behaviours. So far is all good and we get expected results in sandbox with different user profiles. However when I wrote the test method for the controller and trying to run it, I got the following error:

Internal Salesforce Error: 694469977-8690 (1545795159) (1545795159) 

After my investigation, this error occurs when inserting an custom object instance in test method, and below is the code block cause the issue:

Scenario__c sc = new Scenario__c(Opportunity__c=opp.Id, Medical_Centre__c=pryAcc.Id, Contracted_Hours_per_Week__c=40,    
                                                    Contracted_Years__c=5, Evening_Hours_per_Week__c=5, Weekend_Hours_per_Week__c=6,                                                                         Working_Weekends_per_Year__c=40, Weeks_Not_Req_to_Work_per_Year__c='4 weeks', 
                                                    Has_VR_Status__c=true, Ack_Leave_Not_Carried_Over__c=true, Ack_Restricted_Internet_Access__c=true,
                                                    Ack_No_Appointment_Basis__c=true, Ack_No_STD_ISD_Mobile_Ph_Access__c=true,
                                                    Ack_Work_Equal_Share_of_Public_Holidays__c=true, Ack_Xmas_New_Year_Special_Roster__c=true,                                                             DWS_Position_Required__c='Yes', Selected_Price__c=true);
  
 insert sc;

(opp.Id & pryAcc.Id are previoused inserted account and opportunity id, which required in scenario calculator)

If I removed this piece of code, the test passed but will pull down the coverage% of the whole test. I have gone through some online comments but no final solution to this issue.

Any advices on that?



Thanks in advance.
Stanley
Best Answer chosen by Stanley Ye
Prabhat Kumar12Prabhat Kumar12
Give a try to this.

a) Change the API version of the affected test class to API version 23.0 or below. 
b) Use @isTest(SeeAllData=true)

Let me know if it does not work for you.

All Answers

Prabhat Kumar12Prabhat Kumar12
Give a try to this.

a) Change the API version of the affected test class to API version 23.0 or below. 
b) Use @isTest(SeeAllData=true)

Let me know if it does not work for you.
This was selected as the best answer
Stanley YeStanley Ye
Hi Prabhat, 
    I've changed the version to 23.0 and seems it works. Not sure why higher versions got this error.

Anyway appreciate it !