I am trying to run batch from managed package, cant see its code, and batch has empty scope, 0 chunks. When I see the scope query in debug logs there is no where cluase and th records exists in database. I am running batch with same user as I am executing SOQL query to check if user has permissions for those objects, and yes, user sees the records. AFAIK debug logs should show whole query, also with where clause, so there is no option that some part of query is hidden.

Any Ideas why scope could be empty?

  • 2
    I am afraid, that's not possible, managed package logs only shows the query without criteria.
    – Raul
    Commented Sep 28, 2017 at 10:52

1 Answer 1


You can request from salesforce support that log visibility be temporarily enabled for a given namespace. It also may take a few tries or escalation as your results will depend on the knowledge or ability of the support rep. and you may have to try a couple times until you get one that knows what they are doing.

Doing this will allow you to see the full logs.

Be aware though that there is a logging error that may bite you. As an ISV logged in via the LMA all batch logs remain obfuscated when executed by database.executeBatch even though they should be visible. The workaround is to call the execute method directly if it is global otherwise even the package owner cannot see batch logs

Not sure if the above bug will hit you when Support opens up the logs but requesting temporary visibility would be worth a shot

You must log in to answer this question.

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