1

Subject: Developer script exception from Relias Learning :

CommentsOnClosure : CommentsOnClosure: execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a null object Trigger.CommentsOnClosure: line 47, column 1 Apex script unhandled trigger exception by user/organization: 005d0000002M0Zj/00Dd0000000fdHa

CommentsOnClosure: execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a null object Trigger.CommentsOnClosure: line 47, column 1

I am getting the above exception ...Just wondering is Developer Script Exception is type of Exception that we get for some runtime error in the apex code or is there any other meaning to it??

3

The core messages in there is:

execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a null object Trigger.CommentsOnClosure: line 47, column 1

This is indeed a runtime exception, it happend in the location as described in the error message. The System.NullPointerException type describes what precisely is happening. In your apex you're using a reference to an object that is still null. Updating your question with the code may provide us insight in what's going wrong.

To understand what a null reference exception looks like, imagine the following scenario:

Account acc;
acc.name = 'test'; //this would cause a null reference exception

While the first line declares a variable (placeholder) for an account object instance, it is still empty. Attempting to populate the name field on the empty place holder will result in a null reference, no actual object (record) can be found in the placeholder variable.

1

Developer script execution emails are Runtime exception messages which always get sent to the 'Last Modifed By' user of the Apex class that generates the exception.

On the user record there is a checkbox 'Send Apex Warning Emails' , which should be checked in order to receive Emails.

In your case, you are receiving this email precisely for the reason mentioned by @Samuel's answer.

  • There is a clarification of "Send Apex Warning Emails" here help.salesforce.com/apex/… that says "Developer script execution" emails always get sent. – Keith C Apr 23 '14 at 9:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.