You need to sign in to do that
Don't have an account?
Emily Walton 22
Apex trigger error: Attempt to de-reference a null object
I am not a developer but I am supposed to trouble shoot this apex trigger error. Can someone help let me know what I need to change in the code to fix it?
Error:Apex trigger RHX_Turbine_Config caused an unexpected exception, contact your administrator: RHX_Turbine_Config: execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a null object: Class.rh2.AggregateFunctionWorker.handleMultipicklistValues: line 23, column 1
Code:
1 trigger RHX_Turbine_Config on Turbine_Config__c
2 (after delete, after insert, after undelete, after update, before delete) {
3 Type rollClass = System.Type.forName('rh2', 'ParentUtil');
4 if(rollClass != null) {
5 rh2.ParentUtil pu = (rh2.ParentUtil) rollClass.newInstance();
6 if (trigger.isAfter) {
7 pu.performTriggerRollups(trigger.oldMap, trigger.newMap, new String[]{'Turbine_Config__c'}, null);
8 }
9 }
10}
Error:Apex trigger RHX_Turbine_Config caused an unexpected exception, contact your administrator: RHX_Turbine_Config: execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a null object: Class.rh2.AggregateFunctionWorker.handleMultipicklistValues: line 23, column 1
Code:
1 trigger RHX_Turbine_Config on Turbine_Config__c
2 (after delete, after insert, after undelete, after update, before delete) {
3 Type rollClass = System.Type.forName('rh2', 'ParentUtil');
4 if(rollClass != null) {
5 rh2.ParentUtil pu = (rh2.ParentUtil) rollClass.newInstance();
6 if (trigger.isAfter) {
7 pu.performTriggerRollups(trigger.oldMap, trigger.newMap, new String[]{'Turbine_Config__c'}, null);
8 }
9 }
10}
Can you please share ParentUtil and AggregateFunctionWorker class codes too?
If its manage package, Then check the user guide you must be missing some configurational data.
My bad (I don't know how I missed this basic concept). In manage package we can't see the class code.
Applogies. Please follow the instructions which Niket has shared.