I see that the queries made by the managed package are visible in the subscriber org. Is that the default behavior or can I limit the access to the SOQL query logs?


The actual query being made is shown and the number of rows returned. I cannot find specific documentation stating this is expected or if all queries are visible but it has been my experience that they are shown and cannot be hidden.

To make matters worse if you are worried about debug logs, customers can log a case with salesforce to get the debug logs unhidden for a period of time without your consent so keep that in mind if you have any IP you are debugging.

  • 1
    Never leave system debugs in production code... Maybe if you have a kill switch it's fine...
    – Adrian Larson
    Apr 6 '17 at 2:18
  • @Eric, Adrian, thanks. Thats a bit concerning if you want to have IP protection for your code and have a bunch of logs tracing the behavior. How do ISVs debug their code in subscriber orgs. Is it advisable to have a protected custom settings? If yes, that would also mean that you have to upgrade the package to toggle the setting for enabling/disabling logs since protected settings are not accessible outside managed package namespace.
    – Brian
    Apr 6 '17 at 2:36
  • @Brian - You can see your code when logged in via the LMA. As for the custom setting, you would log in via the LMA as well. Even if set and if you are not logged in the debug would be hidden. The only other way would be to write records to the DB. Keep in mind that any errors would be hidden text regardless unless you are logged in via the LMA
    – Eric
    Apr 6 '17 at 2:39
  • I see. Can you update protected custom settings when logged in via the LMA?
    – Brian
    Apr 6 '17 at 2:42
  • @Brian - Yes.....
    – Eric
    Apr 6 '17 at 2:43

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.