0

I use custom logging for my managed package and have a protected custom settings called logEnabled which acts as a switch to capture logs.

I want to be able to use it a subscriber org to capture logs. However, as I understand protected custom settings are not accessible outside of apex code within the namespace.

How do I toggle this setting in the subscriber org?

0

As you've noted, you literally cannot modify protected settings outside of code. You'd have to have code you can call in the subscriber org. Depending on how well you want to protect this page, you might decide to have it require a password or some other authentication in order to prevent casual usage, or perhaps a webservice method that you can call from the API, or some other technique. The main takeaway here is that you need to have code in your code base somewhere that can toggle this setting for you.

  • @sdfcfox Thanks. I liked the idea of using a password as a protected setting. But that still has the same problem, I would not be able to update this password from an outside code. If I expose it anywhere in the subscriber org that defeats the purpose of having it in the first place . I do not think protected custom settings are useful in an editable/modifiable context. That is just static data – Brian Mar 31 '17 at 18:26
0

Protected custom settings are available/editable through LMA org.

If you log in to the Subscriber org through LMA org, then you have full access to the protected custom settings.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.