I have created a Protected/List custom setting object in my org (not a managed package)
It's Custom fields are:
I created a dataset named:
test with relevant values (I had another dataset with a ' ' space, thought this causes the problem.
When I try to access the dataset from APEX, I keep getting Null reference error.
System.NullPointerException: Attempt to de-reference a null object (error in line 15)
Code snippet: (code is in apex class - not @test)
14: Netsuite_Integration__c m_nsi = Netsuite_Integration__c.getValues('test'); ERROR LINE: 15: system.debug('15 m_nsi.NS_Email__c:' + m_nsi.NS_Email__c);
- Already Tried getValues, getInstance
- Recreated the object again in Sandbox (known issue)
- Created several datasets with different names (removed space)
While coding, developer console does recognizes, and autocompletes