The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
1answer
20 views

CampaignMember.getSobjectType() returning null

Whenever i am calling CampaignMember.getSobjectType() method , getting nullpointer exception. I tried to debug the CampaignMember object but getting null value object as well. Marketing User checkbox ...
0
votes
1answer
21 views

NullPointer Exception at Boolean value assign

Please find below class where I get Null Pointer Exception while assigning value to boolean. Please let me know where is my fault here? Thanks! Apex Class: public class CallReplica_controller { ...
1
vote
1answer
38 views

Trigger Null pointer exception

I have this trigger that errors out at line 13 NullPointerException attempt to de-reference a null object in Apex Trigger Code trigger Event_Attendee_vod on Event_Attendee_vod__c (before update, ...
4
votes
2answers
26 views

Failing test is showing as passed

In Debug Logs I can see a System.NullPointerException for the unit test that was just run, but on the Apex Test Execution page I see the test as passing. The error is not buried within the log ...
4
votes
2answers
99 views

Null Pointer Exception add AccountId to WhatId for Task

Trying to build what I thought would be a simple trigger: when a task is created that is only related to a contact (WhoId = contact type, but WhatId = null), relate the task's WhatId to the contact's ...
0
votes
1answer
34 views

I am getting a null pointer exception with this line of code: cse.opportunity__r.id = opp.opportunityid; cse.account.id = opp.opportunity.accountid;

I am trying to set the created case account to the opportunitylineitem.opportunity.account and the opportunity__c (lookup on opportunity) to the opportunitylineitem.opportunity. I am getting a ...
0
votes
1answer
31 views

Calling JSON.deserialize() throws “System.NullPointerException: Attempt to de-reference a null object”

I'm trying to use the System method JSON.deserialize(jsonString, apexType) to deserialize the body of an ApexRest POST request. My code compiles, but at runtime I'm getting a ...
0
votes
3answers
57 views

Test Class doesn't push values into a trigger; Getting: System.NullPointerException: Attempt to de-reference a null object

I have trigger that on deployment is throwing a NullPointerException. The error is: Trigger.tgr_send_enrollment: line 13, column 1: [] System.DmlException: Insert failed. First exception ...
1
vote
1answer
53 views

NullPointerException; why am I getting this?

I am at a loss as to why this trigger is throwing up a NullPointerException... it isn't clear to me, as I am querying for the OwnerId before I loop through my inserted tasks. The error message is as ...
1
vote
0answers
29 views

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

System.NullPointerException: Attempt to de-reference a null object Class.CM_LocationAlarmListViewTestExt.__sfdc_hasPrevious: line 23, column 1 public with sharing class ...
1
vote
2answers
92 views

Attempt to de-reference a null object in trigger to create child object upon field change

I have created a trigger on the Project custom object, to create a record in the Project Note custom object when the description field is modified. Running the unit test however, I receive the ...
3
votes
2answers
101 views

Why is this Apex Trigger throwing a Null Pointer Exception: Argument cannot be null?

This trigger references blank fields, and complex formula fields. The reason I'm trying to do a trigger and not a formula is that it resolves to too many characters because of referenced formula ...
3
votes
1answer
104 views

NULL lookup field in Test Class

I'm getting a null value on a lookup field when running a test class. Account a = new Account(Name = '1', Owner = u, CurrencyIsoCode = 'CAD'); insert a; a = [SELECT id, AccountNumber, Name, ...
2
votes
1answer
46 views

Using rendered=“” parameter causes checkbox to evaluate to null

Putting checkbox inside outputpanel or using rendered on itself, will display correctly, but will cause null de-reference when its used in the class. What is the reason behind? This works: ...
2
votes
1answer
32 views

NULL POINT Exception

I am getting NULL POINT Exception error when running my unit tests and can't seem to figure out how to go about this one. This is the error Message; |FATAL_ERROR|System.DmlException: Insert ...
1
vote
1answer
120 views

Attempt to De-Reference a null object won't except data

I have an issue when I try to input data into a custom object. On line 14 is where I'm getting the NullPointer. System.debug(testAccount[0].name) outputs an account name created in line 8. But when ...
1
vote
1answer
34 views

System.NullPointerException Error for new method to be deployed through Change Set

I have added a new method in a class and added test data in the test class . It was PASS when I Ran the test class in Sandbox. However , when I'm trying to deploy in Prod through Change Set, It's ...
0
votes
0answers
49 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
48 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
69 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
198 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
47 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
48 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
77 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
100 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
46 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
160 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
90 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
855 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
89 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
325 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
51 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
121 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
108 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
507 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 ...
1
vote
1answer
501 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
373 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
837 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
36 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
3k 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
275 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
3k 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
250 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
345 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
518 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
89 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
435 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
147 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
942 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 ...