Skip to main content
DealerTeam

Overcome Error When Saving Tasks and Cashiering

Goal

Overcome two issues that cause the inability for users to save Activities or object records that auto-generate an Activity (ex. Cashiering).

Issue

A Salesforce Known Issue has caused a system generated error message, displayed below, when trying to save Activities or an object record that auto-generates a task.  

Salesforce Issue 1: Reference W-2943792

Salesforce Issue 2: Reference W-3019714

Error

Error: Invalid Data. 

Review all error messages below to correct your data.

Apex trigger s2cor.Sage_COR_Task_Trigger caused an unexpected exception, contact your administrator: 
s2cor.Sage_COR_Task_Trigger: execution of AfterInsert caused by: line 253, column 17: Dependent class is invalid and needs recompilation: 
Class s2cor.Sage_COR_Task_Trigger_Handler : Dependent class is invalid and needs recompilation: 
Class s2cor.Sage_COR_Cache : Dependent class is invalid and needs recompilation: 
Class s2cor.Sage_COR_ObjectUtilities : Dependent class is invalid and needs recompilation: 
Class s2cor.Sage_COR_Lightning_Helper : Dependent class is invalid and needs recompilation: 
Class s2cor.Sage_COR_Lightning_Data_Helper : Dependent class is invalid and needs recompilation: 
Class s2cor.Sage_COR_Form_Helper : Dependent class is invalid and needs recompilation: 
Class s2cor.Sage_INV_Trade_Document_Ext_L : Dependent class is invalid and needs recompilation: 
Class s2cor.Sage_COR_Inner_List_View_Ctl : Dependent class is invalid and needs recompilation: 
Class s2cor.Sage_COR_Base_Grid_Manager : Dependent class is invalid and needs recompilation: 
Class s2cor.Sage_COR_Transaction_Item_Grid_Manager : Invalid type: RecentlyViewed

 

Resolution: Execute Apex Test Class

To resolve the issue you must run a test class that is of appropriate API version, v30 or above, that is alphabetically before any test classes under v30.

Step 1: Navigation

Click Setup and in the Quick Find Box search for Text Execution. 

Click Apex Test Execution

Attention Users, Salesforce has two different desktop user interfaces: Lightning Experience and Salesforce Classic.

As seen in Salesforce Classic 

Test Execution Classic

As seen in Salesforce Lightning 

Test Execution Lightning

 

helpNote_icon.gif Sage created a test class and installed it into many orgs named "aaaaaTest". If you don't see it in your org open a case.

 

Step 2: Select Test Classes

- Click Select Tests and choose the check box for aaaaaTest class.

- Click Run.

aaaaaTest Classic