You need to sign in to do that
Don't have an account?
pvelan
Null pointer exception
Below in my Apex class executes fine for users with sysadmin profile.
Settings__c Settings = Settings__c.getInstance();
But for non sysadmin profile users, it is throwing null pointers. All profiles has access to the Apex class. Could someone give me some pointers for this issue?
Another thing is that 'Settings__c' is seen in the list of custom objects and tried in managed packages too.
Thanks
The Settings__C object here is a Custom Settings Object defined as Hierarchy. Hierarchy settings work differently and can have multiple values for different profiles/users.
Try going through the below url. - You will get some idea on how this works.
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_custom_settings.htm
in case of hierarchy custom settings try to have default values in fields.