--- title: "Mass Delete Mogli Message Records" slug: "mass-delete-sms-records" updated: 2026-03-25T17:15:09Z published: 2026-03-25T17:15:09Z canonical: "guide.mogli.com/mass-delete-sms-records" --- > ## Documentation Index > Fetch the complete documentation index at: https://guide.mogli.com/llms.txt > Use this file to discover all available pages before exploring further. # Mass Delete Mogli Message Records ## Getting Started Prior to proceeding, you will need to consult your System Administrator about the mass deletion of any records in your organization. It’s likely they will need to assist you with this process. If you are removing Mogli Message records from a bulk send or intelligent route, you will need to remove the associated Async Task records first. If these are not removed, Mogli will continue to attempt sending the bulk message. Follow the steps in the Mass Delete Async Task Records section prior to deleting Mogli Message records. Option 1: Delete Mogli Message with the In-App Button This option allows you to manually select up to a few hundred records from the Mogli Message list view to delete. If you want to mass delete all records at a quicker pace, and do not need to hand-select, we recommend using the Developer Console Code option in the next section. To mass delete any records, you will need to ensure you have the **Mogli SMS User: System Admin** permission set assigned to yourself. *Not a system admin? Reach out to your internal admin for assistance.* Go to Setup > Object Manager ![](https://cdn.document360.io/aabde203-b6df-4543-b557-999d7d8b937a/Images/Documentation/mass-delete-sms-records-image-80xotwj1.png) Type **Mogli Message** in the quickfind box and press **Enter.** Click on **Mogli Message.** ![](https://cdn.document360.io/aabde203-b6df-4543-b557-999d7d8b937a/Images/Documentation/Screenshot 2025-11-21 at 1.57.03 PM.png) Click on **List View Button Layout**. ![](https://cdn.document360.io/aabde203-b6df-4543-b557-999d7d8b937a/Images/Documentation/Screenshot 2025-11-21 at 1.58.35 PM.png) Click **Edit** in the dropdown on the right-hand side of **List View**. ![](https://cdn.document360.io/aabde203-b6df-4543-b557-999d7d8b937a/Images/Documentation/Screenshot 2025-11-21 at 1.58.55 PM.png) Move the **Mass Delete** button from Available to Selected. Click **Save**. ![](https://cdn.document360.io/aabde203-b6df-4543-b557-999d7d8b937a/Images/Documentation/Screenshot 2025-11-21 at 1.59.22 PM.png) Using the App Launcher, search Mogli and click on **MogliSMS Lightning**. ![](https://cdn.document360.io/aabde203-b6df-4543-b557-999d7d8b937a/Images/Documentation/Screenshot 2025-11-21 at 2.01.35 PM.png) Click on the **Mogli Messages** tab. Choose the list view you’d like to delete messages from. ![](https://cdn.document360.io/aabde203-b6df-4543-b557-999d7d8b937a/Images/Documentation/Screenshot 2025-11-21 at 2.02.31 PM.png) Use the checkboxes on the left hand side to select which records to delete. BE SURE that these are the correct records! ![](https://cdn.document360.io/aabde203-b6df-4543-b557-999d7d8b937a/Images/Documentation/Screenshot 2025-11-21 at 2.03.26 PM.png) Click **Mass Delete**. ![](https://cdn.document360.io/aabde203-b6df-4543-b557-999d7d8b937a/Images/Documentation/mass-delete-sms-records-image-3ciznv0t.png) If you are sure, click **Delete Records**. ![](https://cdn.document360.io/aabde203-b6df-4543-b557-999d7d8b937a/Images/Documentation/Screenshot 2025-11-21 at 2.04.10 PM.png) ADMIN TIP: If you would like this button to be accessed by Admins only, follow the next few steps. This doesn't hide the button from users, but does get rid of the access for users. Go into the Setup > Profiles > (Choose the profile that shouldn't be able to mass delete Mogli Message records) > Visualforce Page Access and remove the Mogli_SMS.SMSMassDelete page. ![](https://cdn.document360.io/aabde203-b6df-4543-b557-999d7d8b937a/Images/Documentation/mass-delete-sms-records-image-6g3n9vmq.png) The button will show on the list view, but if a user tries to use it they'll see a page that says "Insufficient Privileges" ![](https://cdn.document360.io/aabde203-b6df-4543-b557-999d7d8b937a/Images/Documentation/image-1763751937014.png) #### ### Option 2: Delete Mogli Message with the Developer Console Click the **gear** icon in the top right. Click **Developer Console**. ![](https://cdn.document360.io/aabde203-b6df-4543-b557-999d7d8b937a/Images/Documentation/Screenshot 2025-11-21 at 2.06.35 PM(1).png) In the **Debug** dropdown, click **Open Execute Anonymous Window**. ![](https://cdn.document360.io/aabde203-b6df-4543-b557-999d7d8b937a/Images/Documentation/mass-delete-sms-records-image-rdkctyys.png) Paste in **one** of the lines of code below into the new window. Option 1: To delete 10,000 (or less) Mogli Message records in **Queued** status, paste in this code: delete [SELECT Id FROM Mogli_SMS__SMS__c WHERE Mogli_SMS__Status__c = 'Queued' LIMIT 10000]; Option 2: To delete 10,000 (or less) Mogli Message records in **Scheduled** status, paste in this code: delete [SELECT Id FROM Mogli_SMS__SMS__c WHERE Mogli_SMS__Status__c = 'Scheduled' LIMIT 10000]; ![](https://cdn.document360.io/aabde203-b6df-4543-b557-999d7d8b937a/Images/Documentation/mass-delete-sms-records-image-9dp1bhx1.png) Click **Execute**. Double-check that the Queued and/or Scheduled Mogli Message records are deleted in Salesforce. **Note:** This line of code deletes 10,000 records. If you have more than 10,000 records to remove, you will need to execute the code multiple times. #### ## Mass Delete Async Task Records Our bulk send architecture requires the creation and utilization of Async Task records. This step is necessary if you deleted Mogli Message records from a bulk send (or intelligent route) in the previous steps. Consult your System Administrator prior to proceeding. Click the **gear** icon in the top right. Click **Developer Console**. ![](https://cdn.document360.io/aabde203-b6df-4543-b557-999d7d8b937a/Images/Documentation/Screenshot 2025-11-21 at 2.06.35 PM.png) In the **Debug** dropdown, click **Open Execute Anonymous Window**. ![](https://cdn.document360.io/aabde203-b6df-4543-b557-999d7d8b937a/Images/Documentation/mass-delete-sms-records-image-xlrod4q0.png) Paste this line of code into the new window: delete [SELECT Id FROM Mogli_SMS__AsyncTaskManager__c LIMIT 10000]; ![](https://cdn.document360.io/aabde203-b6df-4543-b557-999d7d8b937a/Images/Documentation/mass-delete-sms-records-image-4clbl3fq.png) Click **Execute.** **Note:** This line of code deletes 10,000 records. If you have more than 10,000 records to remove, you will need to execute the code multiple times.