The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
53 views

Static list property returning null

I've built a property to setup test data within my test class, but my tests keep throwing 'Attempt to de-reference a null object' errors. I've been able to narrow it down to this property. I'm finding ...
1
vote
1answer
35 views

De-Reference a Null Object

I'm a new admin in an org that has had some custom development done in the past and our code coverage has fallen below 75%. In one of our Apex Test Classes, we get an error that states: ...
4
votes
1answer
114 views

Why does this call to Trigger keySet() throw a null pointer exception?

I have a simple trigger like: trigger littleTrigger on Custom__c (before insert) { Set<Id> idSet = Trigger.newMap.keySet(); //Some stuff } Why could the second line throw a null ...
0
votes
1answer
95 views

System.NullPointerException: Script-thrown exception

I'm trying to create a trigger which updates the Account owner based on the detail object criteria. The account assignment should be in a round robin fashion so that accounts will be distributed ...
2
votes
1answer
54 views

Attempt to de-reference a null object

When I try to load the visualforce page it gives me the error "Attempt to de-reference a null object " I have narrowed it down to the line of code lstNotes.add(new NoteWrapper(lstNotes.size(),new ...
-3
votes
1answer
156 views

System.NullPointerException: Argument cannot be null. in Test Class

At this line I am getting an errror, while running a Test Class, Please suggest solution - public PageReference Save(){ -------code ------ Object__c obj = new Object__c(); ...
1
vote
1answer
27 views

A little help with odd syntax from Twilio gist

I've been testing Twilios's Salesforce integration and after all the hassle that they do not mention in their blog (deploy unmanaged package to sandbox first, add API key to config page that is deeply ...
1
vote
1answer
571 views

System.NullPointerException: Argument cannot be null

Im getting the error 'System.NullPointerException: Argument cannot be null' when I run my test class, in the below test method. /* * update a existing report */ static testMethod void ...
0
votes
1answer
111 views

System.NullPointerException: Attempt to de-reference a null object : tmpVar1

For some reason the variable does not get assigned. What I am trying to do is to pass a set of ids to VF page from a list button. Here's my VF code: <apex:page ...
3
votes
1answer
686 views

Attempt to de-reference a null object: Trigger

There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was: Apex trigger updatequotestatus caused an unexpected exception, ...
2
votes
1answer
115 views

How can I dynamically transverse dynamically SOQL'd SObject fields in Apex?

So, in my other post, I figured out for myself how to dynamically transverse SObject fields in Apex. But within the context of my work, there is a problem with the solution as it currently stands: ...
0
votes
1answer
134 views

Null pointer exception Attempt to de-reference a null object Trigger

I am trying to default the Account Name in a case to 'abc corp' but while executing the code, it gives the error Attempt to de-reference a null object. its happening at line 10 which ...
0
votes
1answer
271 views

System.NullPointerException: Attempt to de-reference a null object - Update Field Trigger

I'm trying to create a trigger that will update a field on an account whenever the ownership of the account changes. I've tried to remove the NullPointerException error by adding if statements, but ...
0
votes
1answer
61 views

Converting null to nil

I've got quite a challenge while working with null values and a wrapper. I query the database which sometimes might have null values, but when trying to create a new record (or actually assigning ...
1
vote
3answers
293 views

System.NullPointerException: Attempt to de-reference a null object for duraion

I am new to Apex coding. Can someone please help me to resolve the issue. I am trying to automatically display the duration when from and todate is selected. For that i have developed a code in the ...
3
votes
1answer
86 views

Null Pointer on system.debug in @future method

Can someone explain the error? I have a trigger that passes a set of Event IDs to an @future clas. Below is the class: public class eventChatterFuture{ @future public static void ...
0
votes
1answer
797 views

System.NullPointerException: Attempt to de-reference a null object

Can anyone help with this error? System.NullPointerException: Attempt to de-reference a null object Class.productdata.getMapOfContent: line 24, column 1 Here is the Apex Class. "Line 24" ...
2
votes
2answers
918 views

De-reference null object error on Trigger - error only when value is null

I have a trigger and an Account handler. I have an error on record insert. Trigger calls Accounthandler.OnAfterInsert(Trigger.new, Trigger.newMap); Here is a simplified version of the handler top ...
1
vote
3answers
972 views

Attempt to de-reference a null object with Attachment

I am trying to add a attachment to a record. Their may or may not be attachment. So that i have created a attachment in the controller if the attachment is null but i am getting null point exception. ...
0
votes
1answer
259 views

Regex NullObject in Trigger if run from Dataloader else works fine

Fellow developers, I have a call to an email validation function in my before insert in my trigger, which basically puts the email blank if its not valid (according to the regex) public static ...