Feb 2, 2023
To mass delete ApexLogs in Salesforce using SFDX, you can use the Salesforce CLI (Command Line Interface) to execute a SOQL query that selects the ApexLog records you want to delete and then deletes them.
Here are the steps to do this:
Open a terminal or command prompt and navigate to your SFDX project folder.
Run the following command to authenticate your Salesforce org:
#!/bin/zsh
sf data query -q "SELECT Id FROM ApexLog" --result-format "csv" > outApexLog.csv
sf data delete bulk --sobject ApexLog --file outApexLog.csv
rm outApexLog.csv
🚩🚩 My Latest App is now on the AppExchange
Viewer for Document Generator. This app is based on word template, it includes unlimited users and unlimited templates and unlimited automation. Here is the link: https://4winds.link/VIewerLP