Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [null]

The tag has no usage guidance.

2
votes
1answer
26 views

Adding null to Set<Id> doesn't return an empty Set

Set<Id> testIds = new Set<Id>(); testIds.add(null); system.debug('testIds are ' + testIds); system.debug('Size of the set is ' + testIds.size()); system.debug('isEmpty result is ' + ...
3
votes
3answers
486 views

JSON.serialize: is it possible to suppress null values of a map?

I tried to serialize a map with null value (api 45): Map<String, String> bodyMap = new Map<String, String> {'key'=>'value', 'key2'=>null}; System.debug(JSON.serialize(bodyMap,true));...
1
vote
0answers
14 views

Can Jitterbit (or any ETL tool) do field-by-field “insert null values” without using the bulk API?

I can see that when an ETL tool is using the Bulk API, there isn't a global "insert null values" setting and you have to explicitly set cells to #N/A to get them to overwrite to null. That's nice, ...
1
vote
2answers
28 views

System.QueryException: execution of BeforeUpdate caused by List has no rows for assignment to SObject ()

I am receiving the following sync error in Pardot: System.QueryException: execution of BeforeUpdate caused by List has no rows for assignment to SObject () I think it is this trigger that is ...
1
vote
2answers
26 views

Field not available in list from SOQL

I have a custom field that is populated by integration, and in certain cases a currency field will end up as blank. It will not evaluate to null or 0. SQL Execute from dev console log: 13:26:53:006 ...
0
votes
1answer
54 views

Why does the trigger always read my if statement as null? [duplicate]

See the code below from an APEX trigger. For some reason, my trigger always reads nextRenewalDate (field from Account object) as null, regardless of whether or not it is blank. Racking my brain here ...
0
votes
1answer
14 views

Why does my country returns null on creating an account?

I am creating a testdatafactory. creating a country goes well. When creating accounts my country fields are null if i debug CountryList it returns the created country record. Factory class @isTest ...
0
votes
0answers
33 views

Null Value for record after getting id from a map of ids and accounts

The system.debug shows that the id for TempAcct is associated with the correct id after a.get('Franchise__c'), but NewAcct = null. The debug shows that the id was mapped correctly to filterIds, and it'...
2
votes
3answers
884 views

Null List VS Empty List

I have a basic question about how a list is loaded. Consider these scenarios: List<Lead> leadList1 = [SELECT Id FROM Lead]; List<Lead> leadList2 = new List<Lead>(); List<Lead&...
0
votes
1answer
310 views

Batch error: Attempt to de-reference a null object with check for !=null

I have a batch apex where I insert some records. I check on the fields for != null but still get the error: Attempt to de-reference a null object Here is my batch part: global void execute(...
2
votes
1answer
86 views

How do I set a string field to null in a Big Object using Apex?

Is that something that is not allowed? Is it a bug? I just tried and it did not seem to set anything. The index of Named_Entity_Big__b is over the following, and I'd like to set Result__c to null: ...
2
votes
1answer
48 views

Expected behaviour in a query filtering by parent null field

What should I spect when the account is null in the below code? SELECT Id, name, Account__c FROM AccountChildren WHERE Account__r.someField = true I am having issues debugging the query and I would ...
2
votes
0answers
38 views

How does an approval step's criteria handle nulls?

I have a custom User field, a nullable integer. As expected, I see the following behavior: $User.Custom__c <> 0 // FALSE $User.Custom__c = 0 // FALSE Apex works the same way, and this ...
5
votes
2answers
9k views

Lightning Component Visibility filter to check if value is null

How can I set a Lightning Component visibility based on text filed value = NULL. I have a text area field and I want to only display one component if Text area field contains value. I can't seem to be ...
0
votes
1answer
97 views

Test class throwing argument cannot be null error

I am seeing System.NullPointerException: Argument cannot be null in my test class Below is the controller method that i am trying to cover : public void Synchsongmethod() { system.debug(...
1
vote
1answer
356 views

Try/Catch for Attempt to Dereference Null Object

Is there a way I can test with an IF statement for a null object. Using an IF (obj==null) throws the error. How can I account for these? With SOQL, I use a list and check the number. However, the ...
0
votes
1answer
208 views

SOQL Field returning null when it is not

I have a custom field: Show_DateTime__c which is a formula(Date/time) When I run the following anonymous apex: Coverage_Request__c covreq = [Select Show_DateTime__c, name from Coverage_Request__c ...
1
vote
2answers
3k views

Filter NULL values in reports?

How can I filter out NULL values from within the reports editor for a text field?
0
votes
2answers
25 views

Map not getting populated

I have below code where the Map is not getting populated and throws Null Pointer error. System.NullPointerException: Attempt to de-reference a null object Code: for(Business_Plan_abv__c obj : [...
5
votes
1answer
111 views

Keep null values in Remote JSON call [closed]

I'm working with an external app that is making callouts to Remote Actions in my controller. When I return the value to them, it's returning a custom data structure with 2 parameters, result, and ...
1
vote
2answers
440 views

Making “Null” as “” in JSON payload

I am trying to push a JSON input payload, but some fields might be blank. The receiving system has a problem with it. They want either the blank fields to not be sent all together or replace "Null" ...
0
votes
1answer
32 views

Null values for one custom field

I have below trigger block. I am getting null values for dsrl.Related_Opportunity_del__r.Business_Group__c. if(Trigger.isbefore && (Trigger.isInsert|| Trigger.isUpdate)){ System.debug(...
8
votes
2answers
694 views

Ambiguous method signature on NULL value

I know that all primitive types are objects and can be null in Apex But is there a way to handle the null value when doing polymorphism ? public class myClass{ public myClass(String name){ ...
2
votes
1answer
1k views

How to insert/pass NULL value into Date field

I am trying to insert a null value into a field of type Date (in SalesForce) using a PHP Script. Here is my logic. $Date = '', $createField['Date__c'] = $Date; I tried the following, but none of ...
0
votes
2answers
38 views

Null Account in insert procedure in Contact

I'm trying to add an Account id to Contact but when I do the insert and than I check the Contact just created it appear null. I'm using the following code: Account Acc = [SELECT id FROM Account ...
3
votes
1answer
261 views

How to handle optionally null related objects in process builder?

We have a custom object that can be associated with an account. Since this object type is usually created by an automated process, we'd like to trigger emails to account owners when these objects are ...
1
vote
2answers
356 views

Event WhoID is null in lightning?

i created a trigger (EventBeforeInsert) that use the WhoID of the event to do other things, it works perfectly in the classic but in lightning this particular field is null in my code although the ...
7
votes
3answers
7k views

Null check OR isEmpty Check

I have checked many posts but still not clear. A SOQL query returns a list but if SOQL finds no records then it will return an empty list or it will be null? When should i go for isEmpty check or ...
0
votes
2answers
220 views

How To Verify that a List/Field is not empty?

These are the methods I use to check if a field is empty: p.Call_Summary__c != null p.Call_Summary__c!='' And these are the methods to check that a list isn't empty: CClist != null CClist.isEmpty(...
1
vote
1answer
2k views

Salesforce Flow : Check for null value in custom lookup field

I have a flow that I'm triggering via Process Builder on the Opty Line Item object. The flow currently creates a new Opty and then updates a custom field on the original Opty Line Item with that new ...
3
votes
0answers
157 views

Why is an empty apex:attribute neither null nor blank but still an empty string?

Consider this simple component: <apex:component access="public" layout="none"> <apex:attribute name="myString" type="String" /> {!ISNULL(myString)} {!ISBLANK(myString)} {!...
3
votes
1answer
2k views

RestContext.request.params.get gives null value for Test Class

RestContext.request.params.get gives null value for Test Class Following is my code and Debug logs : APEX CLASS : String accountRecordId= RestContext.request.params.get('accountRecordId'); ...
0
votes
1answer
55 views

Null values isn't seen as null [duplicate]

I have a text field that has nothing in it. I created a formula to check if it is null, but it keeps coming up that it exists. IF(ISNULL({!textfield}),"Null","Exists") There isn't a hidden space or ...
1
vote
2answers
767 views

get Attempt to de-reference a null object on wrapper class

i get this error when i click on the Commandbutton Enregistrer, i debug the code and i realized that the error comes from the method Enregistrer what i do not know why ? apex: public class ...
1
vote
0answers
592 views

Recordtype is changing to null

We're facing a pretty serious bug and have no idea what is causing it. Something is causing our opportunity record types to become null. They were a specific record type, and then through the day, ...
1
vote
2answers
53 views

getting system Null reference error

I've been at this for a while and can't seem to figure out why I'm getting the error "System.NullPointerException: Attempt to de-reference a null object" for the "comments.add(com)" line below ...
0
votes
1answer
47 views

Attempt to de-reference a null object - Error in sorting list

I am getting subject line - error while I try to execute below apex code snippet Apex Code Snippet for(Integer index = 0; index < surveyInstanceList.size(); index++) { Survey_Question_vod__c ...
0
votes
3answers
48 views

Does list element get removed after deletion of that record from database?

Updated my question: Scenario:I am making certain changes in an opportunity record and clicking save. This causes trigger to execute and this trigger is executed recursively 3-4 times. Now say I have ...
1
vote
2answers
344 views

Trigger will not fire, picklist value always returns null

In an apex "before update" trigger, I have a conditional statement based on a picklist value. However, this conditional statement never fires because the picklist value always returns null. trigger ...
0
votes
1answer
1k views

Map key null not found in map

I want to render a specific column based on the some conditions, the first is that a flag should be "TRUE" and the second is that the The ids should be the sames, like that, if a click on a specific ...
10
votes
4answers
607 views

Can apex:param pass null for Integers?

I'm trying to reset an Integer value to null, but it is converted to 0. <apex:actionFunction action="{!doSomething}" name="doSomething" rerender="nothing"> <apex:param name="indexValue" ...
0
votes
2answers
265 views

<apex: textarea> return null value when trying to pass its value as a prameter

In visualforce, I am iterating through a wrapper class and for each iteration, a textbox is displayed. My code snippet is: <apex:repeat value="{!comList}" var="com"> <b>{!com.comment.name}...
0
votes
1answer
79 views

Attempt to dereference null object error

I have below controller where I get Attempt to dereference a null object error at ProdIds.add(c.id); Line. Error Code public TestController(ApexPages.StandardController stdCtrl) { ...
2
votes
2answers
682 views

Assertion failure that a null pointer exception is caught

I am doing some test code right now. In my Apex code I have a method that try-catches a DMLException and afterwards does a general Exception catch. In my test code I am successfully managing to test ...
0
votes
1answer
4k views

A flow trigger failed to execute with Version ID -

I have one Process builder which calls Flow which call another flow. I came across following two situations on Case - ERROR Message 1: Workflow Action failed to Trigger Flow The record ...
14
votes
4answers
19k views

What Criteria to use in Process Builder to check for NULL reference?

I have a lookup field on account - for other accounts - Name: Account Parent Tiered OBJ How do I check in Process Builder that it's actually empty? Using the Global Constant NULL or: IS Null true ...
0
votes
1answer
52 views

Attempt to dereference a null object

I am running tests on the following code: global class CarrierTrackingBatch implements Database.Batchable<sObject>, Database.AllowsCallouts{ global String ShippingStatus; global String query; ...
0
votes
2answers
56 views

Why am I getting NULL pointer exception in line 14

I have created a simple VF search page which returns a list of email addresses but getting NULL pointer exception in line 14 when I execute the search in VF page. Seeing that line 14 is the line ...
0
votes
1answer
46 views

How to create a formula to output a number for a picklist value, and reject an N/A value?

In creating a formula to stamp the numerical value of a picklist, I am having difficulty with an "N/A" value. Right now, the picklist has 0,1,2,3,4,5,6,7,8,9,10,N/A as options to choose from. I am ...
1
vote
0answers
97 views

Stop from entering a null value in apex inline edit

I have the following code <apex:outputField value="{!pubAut.AcceptedDate__c}"> <apex:inlineEditSupport event="ondblclick" rendered="{!(pubAut.AcceptedDate__c!=NUll&&pubAut....