You need to sign in to do that
Don't have an account?
Christopher Taylor
I am receiving an apex error when updating an opportunity for triggers that havent been edited since 2013.
I receive the following error when attempting to create new opportunities. I can update existing ones just fine. The apex trigger in mention hasn't been updated since 2013.
Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger Opportunity_UpdateNextTask caused an unexpected exception, contact your administrator: Opportunity_UpdateNextTask: execution of BeforeInsert caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.Opportunity_UpdateNextTask: line 25, column 1
Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger Opportunity_UpdateNextTask caused an unexpected exception, contact your administrator: Opportunity_UpdateNextTask: execution of BeforeInsert caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.Opportunity_UpdateNextTask: line 25, column 1
Looking at the error message, it seems one of the variable is used without actually been intialized first. In order to help you further on this error, it will be good if you can post small snippet of the trigger (Opportunity_UpdateNextTask) from line 20 to 30.
The code cas not been updated since its creation in 2013.
You can either update the task to have subject populated or modify the line 25 as below