Friday, August 16, 2019

Deleting Logs in Salesforce

Sometimes Salesforce logs are clog up the environment and you need to delete them. 

Logs are found in two different places in Salesforce.

Deleting Apex Logs

If you receive this message, this is an indicator that you need to delete your Apex Logs

The Developer Console didn't set the DEVELOPER_LOG trace flag on your user. Having an active trace flag triggers debug logging. You have 251 MB of the maximum 250 MB of debug logs. Before you can edit trace flags, delete some debug logs.

1.  Click the gear icon and choose developer console

2.  In the query editor tab enter the query and click Execute

SELECT Id, StartTime, LogUserId, LogLength, Location FROM ApexLog


3.  Select the rows to delete and click Delete Row



Remove from Debug Logs


1.  Click on Gear Icon and then Setup


2.  Search for Logs


3.  Delete all the Logs or Just for your user