Home SALESFORCE Clear Users from Debug logs using SOQL in Salesforce

Clear Users from Debug logs using SOQL in Salesforce

ERROR: sObject type ‘TraceFlag’ is not supported.

Follow below steps in Production/Sandbox/Developer Organization if you see the too many users added in debug logs
Setup -> Administration Setup -> Monitoring -> Debug Logs

1. Go to Developer Console (Your name -> Developer Console)
2. Click on ‘Query Editor’ tab
3. Run this query with ‘Use Tooling API‘ checked and click ‘Execute’: SELECT ID FROM TraceFlagClear-User-from-debug-logs
4. This should return some records. Select all records and click ‘Delete Row’
5. Repeat 3 and 4 until you are left with 1 or 2 records and check back in debug logs. Most of the users must be cleared now

Reference:

Tooling API – https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/intro_api_tooling.htm

You may also like

Leave a Comment