2

I have a protected custom setting in a managed package, and I have a custom field within that custom setting that holds a secret key that I'd like to obtain and use to authenticate users in some code I have in the package.

The issue I'm having is when I call the appropriate function to get this key it returns a null pointer, however in the console when I debug that same line I can see the value of that key. So it would seem like the data is not in the object but I've confirmed that data is in from my debug statement.

I would appreciate any help on this issue, please let me know if I've left something unclear.

Thanks

  • 1
    Protected Custom Settings will divulge their secrets only to the managed package to which they belong. As long as the custom setting and the class trying to retrieve the value are in the same managed package, there won't be an issue. Clearly the value is in the custom setting, so you may just simply be reading the logs incorrectly (e.g. the null pointer exception is actually a different variable on the same line where the exception is thrown). If you post the code where the null exception is happening, maybe we can help pin it down. – sfdcfox Jul 12 '13 at 23:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.