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?

2 Answers 2


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.


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.

  • 1
    @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
    Commented Mar 31, 2017 at 18:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .