The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
36 views

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

I am getting the error on click of button in VF Page. In the controller , we are getting data from one object and grouping and performing some arithmetic operations and creating records. In the ...
0
votes
2answers
19 views

Attempt to de-reference a null object - Delete

I am getting Attempt to de-reference a null object at below when del() method is called. Can anyone point out what has went wrong : public class DeletingCheckedRowsController { public ...
0
votes
1answer
45 views

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

I am getting the mentioned error in the following line: map1.get(PAPC.Country__c).Q1__c += (PAPC.Q1FX__c == null ? 0.0 : PAPC.Q1FX__c); Baically it's assigning value from one object to the other. ...
5
votes
1answer
47 views

Force Dynamic Soql results to include fields with null value

So I've read a lot about this and it seems that queries run with Database.query(queryString) will skip over any field values set to null instead of returning the property set to null This has cause a ...
0
votes
2answers
19 views

Substring is getting nullpointer exception

I have a map of contacts. Need to print substring of title. but it errors out, when title is null : System.NullPointerException: Attempt to de-reference a null object public class k { public ...
0
votes
0answers
25 views

Null Pointer Exception due to apex variable in managed package

I have a managed package installed in a customer org. When an exception occurs, I store the line number and stack trace in a custom log record. Is there a way to possibly track down the apex variable ...
0
votes
1answer
40 views

Trigger causing NullPointerException only through Data Loader

I've developed a trigger to run if an Account owner changes, and based on the profile of who it changes to, update upcoming events titled "Welcome Call" to match the account owner. This runs fine for ...
1
vote
1answer
33 views

Trigger Error - Attempt to de-reference Null Object

I'm trying to create a trigger class that will clone an Opportunity that is of a certain record type and reaches a Stage that contains Close Won. Everything saves fine, but when I try to close out an ...
1
vote
2answers
33 views

NullPointerException on Insert

I'm not sure how to write this, but I know what the issue is. The following can be triggered by Insert or Update. Below, mapOfEnroll is Trigger.oldMap. I know the mapOfEnroll value is null on Insert ...
0
votes
2answers
47 views

Null Pointer exception

I have below generic class, whose methods are called from an Account before insert , before update trigger. Below class is getting a Null Pointer exception for any Account at commented line. Can ...
0
votes
1answer
17 views

Logical Help needed - FATAL_ERROR|System.NullPointerException: Argument cannot be null

I have List of Employee's, Now Want to create my ThirdObject record if Condition 1) objEmp.Location__c ==null as well as If Condition 2) objEmp.Location contain in objSecondObject.SecondLocation__c ...
0
votes
3answers
141 views

Visualforce Error: Attempt to dereference a null object

Error comes at line 23. Line 23 is mentioned below as a code comment. I also tried by commenting this line and still error is there. But at line 24 which is upsert(Event); Controller public with ...
0
votes
1answer
46 views

Broken Parent Rollup trigger: System.NullPointerException: Attempt to de-reference a null object on trigger

I'm getting the following error when attempting to mass update accounts via Data Loader. The id throwing the error is the same in each instance. The Trigger (listed below) is meant to aggregate field ...
0
votes
1answer
123 views

Access user creating a record in before insert trigger

I'm trying to set some default values for contact fields based on which user is inserting the record into the database, but am coming up against a NullPointerException as the CreatedById is null ...
0
votes
0answers
44 views

Trigger causes Null Pointer Exception

I have created a trigger, and when I test it in my application, I get the following error: CreatePolicy: execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a ...
1
vote
1answer
84 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
52 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
232 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
289 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
128 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
459 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
31 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
2k 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
203 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
2k 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
156 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
246 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
405 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
73 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
377 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
116 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
882 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
1k 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
1k 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
281 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 ...