function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
4u4u 

Attempt to d reference null object

 

 

Praveen KimarPraveen Kimar

I can see "theResponse" variable in the code, it is declared but the instance is not created in memory. You are not using any SOQL query. As the "theResponse" object is null, you are using "theResponse.shipping_attention__c" in your code. so it is giving the nullpointer exception.

 

public Map<Id,Postal_Address__c> shippingRelatedAddresses() 
{
return relatedAddresses(new Set<Id> theResponse.shipping_attention__c});
}

 

Please check if you are missing any query here.

 

Regards,

Praveen K.