Skip to main content
SidsProjectImpact

Back to all posts

How to Delete A Record In October CMS?

Published on
5 min read
How to Delete A Record In October CMS? image

Best Content Management Tools to Buy in January 2026

1 Ultimate WordPress Handbook: An Essential Guide to Designing Stunning WordPress Websites, Driving Traffic, and Boosting Revenue (English Edition) (Frontend Designer — Tools & CMS)

Ultimate WordPress Handbook: An Essential Guide to Designing Stunning WordPress Websites, Driving Traffic, and Boosting Revenue (English Edition) (Frontend Designer — Tools & CMS)

BUY & SAVE
$34.95
Ultimate WordPress Handbook: An Essential Guide to Designing Stunning WordPress Websites, Driving Traffic, and Boosting Revenue (English Edition) (Frontend Designer — Tools & CMS)
2 Ultimate Figma for UI/UX Design: Transform Your UI/UX Design, Craft User-Centric Interfaces, and Create Stunning Experiences with Ease (English Edition) (Frontend Designer — Tools & CMS)

Ultimate Figma for UI/UX Design: Transform Your UI/UX Design, Craft User-Centric Interfaces, and Create Stunning Experiences with Ease (English Edition) (Frontend Designer — Tools & CMS)

BUY & SAVE
$37.95
Ultimate Figma for UI/UX Design: Transform Your UI/UX Design, Craft User-Centric Interfaces, and Create Stunning Experiences with Ease (English Edition) (Frontend Designer — Tools & CMS)
3 Chikoni 3 in 1 Ficial Face Ice Jade Roller and Gua Sha Tool, Natural Real Jade Anti-Wrinkle Face Eye Neck Massager Tool, Reduce Wrinkles, Puffiness, Migraine, Redness, Pain and Injury,Pink

Chikoni 3 in 1 Ficial Face Ice Jade Roller and Gua Sha Tool, Natural Real Jade Anti-Wrinkle Face Eye Neck Massager Tool, Reduce Wrinkles, Puffiness, Migraine, Redness, Pain and Injury,Pink

  • NATURAL JADE TOOLS REDUCE PUFFINESS & DARK CIRCLES EFFORTLESSLY.
  • VERSATILE ICE ROLLER SOOTHES MUSCLE PAIN, REJUVENATES SKIN DAILY.
  • HANDMADE GUA SHA BOARD SMOOTHS WRINKLES & ENHANCES FACIAL HEALTH.
BUY & SAVE
$7.99
Chikoni 3 in 1 Ficial Face Ice Jade Roller and Gua Sha Tool, Natural Real Jade Anti-Wrinkle Face Eye Neck Massager Tool, Reduce Wrinkles, Puffiness, Migraine, Redness, Pain and Injury,Pink
4 CMS Magnetics Magnetic Tool Tray, 10.75'x4.5'x1.25', Black w/Holding Magnets on Side for Cabinets, Tool Box or Kegerator Fridge | Keg Drip Tray | Beer Taps

CMS Magnetics Magnetic Tool Tray, 10.75'x4.5'x1.25', Black w/Holding Magnets on Side for Cabinets, Tool Box or Kegerator Fridge | Keg Drip Tray | Beer Taps

  • STRONG MAGNETS ENSURE SECURE ATTACHMENT TO TOOLBOXES AND CABINETS.
  • VERSATILE USE AS A TOOL ORGANIZER OR DRIP TRAY FOR KEGERATORS.
  • ISO 9001 CERTIFIED QUALITY WITH HASSLE-FREE AMAZON RETURN GUARANTEE.
BUY & SAVE
$23.99
CMS Magnetics Magnetic Tool Tray, 10.75'x4.5'x1.25', Black w/Holding Magnets on Side for Cabinets, Tool Box or Kegerator Fridge | Keg Drip Tray | Beer Taps
5 CMS Magnetics - Magnetic Pole Detector, a Handy Polarity Identifier to Determine Magnet's North or South Poles, Great for School Teachers, Science Projects, and Metal Detector

CMS Magnetics - Magnetic Pole Detector, a Handy Polarity Identifier to Determine Magnet's North or South Poles, Great for School Teachers, Science Projects, and Metal Detector

  • DETECT MAGNETIC FIELDS FROM OVER A FOOT AWAY WITH ULTRA-LOW FRICTION.
  • COLOR-CODED FOR EASY IDENTIFICATION OF NORTH (RED) AND SOUTH (BLUE) POLES.
  • PERFECT FOR EDUCATORS-ENGAGE KIDS IN HANDS-ON MAGNET ACTIVITIES!
BUY & SAVE
$9.99
CMS Magnetics - Magnetic Pole Detector, a Handy Polarity Identifier to Determine Magnet's North or South Poles, Great for School Teachers, Science Projects, and Metal Detector
6 CMS Magnetics - Magic Levitating Spinning Top Spindle Fidget Toy for Office Desk or School Physics Display Demonstrating The Science Education of Magnetism, Creative Gift Idea for Adults and Kids

CMS Magnetics - Magic Levitating Spinning Top Spindle Fidget Toy for Office Desk or School Physics Display Demonstrating The Science Education of Magnetism, Creative Gift Idea for Adults and Kids

  • CAPTIVATING MAGNETIC LEVITATION-WOW YOUR FRIENDS AND COWORKERS!
  • VIBRANT MULTICOLORS ENHANCE VISUAL EFFECT DURING ROTATION!
  • PERFECT BATTERY-FREE GIFT FOR ANY OCCASION-DELIGHT EVERYONE!
BUY & SAVE
$12.99 $14.99
Save 13%
CMS Magnetics - Magic Levitating Spinning Top Spindle Fidget Toy for Office Desk or School Physics Display Demonstrating The Science Education of Magnetism, Creative Gift Idea for Adults and Kids
+
ONE MORE?

To delete a record in October CMS, you can follow the steps below:

  1. Open your October CMS project and navigate to the backend.
  2. Go to the section or module where the record you want to delete is located.
  3. Locate the specific record you intend to delete from the list or table.
  4. Click on the record's corresponding "View" or "Edit" button to open its details.
  5. Once the record details are displayed, search for the "Delete" or "Trash" button.
  6. Click on the "Delete" or "Trash" button to initiate the deletion process.
  7. You will typically be prompted with a confirmation message asking if you are sure about the deletion. Confirm your action.
  8. After confirmation, the record will be permanently deleted from the database and cannot be recovered.
  9. Refresh the page or navigate back to the list/table view to verify that the record has been successfully deleted.

Remember that deleting a record can have significant consequences, so exercise caution and make sure you have selected the correct record before proceeding with the deletion process.

How to show a confirmation message before deleting a record in October CMS?

In order to show a confirmation message before deleting a record in October CMS, you can follow these steps:

  1. Open the model that you want to add the confirmation message to. This is typically located in the /models directory.
  2. Find the fields.yaml file associated with the model. This file specifies the fields and attributes of the model.
  3. In the fields.yaml file, find the field or column that represents the delete button. This field should have the type button or delete to trigger the deletion action.
  4. Add the confirm attribute to the delete button field. Set the value of the confirm attribute to the confirmation message you want to display. For example:

delete_button: label: Delete type: delete confirm: Are you sure you want to delete this record?

  1. Save the fields.yaml file.
  2. If you are using the default backend form, the confirmation message should now appear when you click the delete button for a record.

Note: If you have a custom form or list view, you may need to modify the template or logic to display the confirmation message before deleting the record.

What is the process of deleting a record through an API in October CMS?

Deleting a record through an API in October CMS involves several steps:

  1. Define the API endpoint: In your Plugin.php file, define the API endpoint where the delete request will be made. For example, if you have a plugin called "MyPlugin" with a model called "Record", you can define the endpoint in the registerComponents() method:

public function registerComponents() { return [ 'MyPlugin\Components\Records' => 'records', ]; }

  1. Create a component: Create a component class (Records.php in this example) in the components directory of your plugin. In this class, implement the onDelete() method which will handle the delete request:

namespace MyPlugin\Components;

use Cms\Classes\ComponentBase;

class Records extends ComponentBase { public function componentDetails() { return [ 'name' => 'Records Component', 'description' => 'Provides API endpoint for deleting records', ]; }

public function onDelete()
{
    // Perform delete logic here
    $recordId = post('id');
    $record = \\MyPlugin\\Models\\Record::find($recordId);
    if($record){
        $record->delete();
    }

    // Return response
    return \['status' => 'success'\];
}

}

  1. Call the API endpoint: Now you can call the API endpoint to delete a record. The URL will be /api/records/delete (assuming your component's name is "records").

Send a POST request to this URL with the record ID to be deleted. For example:

POST /api/records/delete { "id": 1 }

This will trigger the onDelete() method in your component, which will find and delete the record based on the given ID.

Note: Make sure your plugin has the RainLab.User plugin installed and properly configured for API authentication.

What options are available to delete a record in October CMS?

There are multiple options available to delete a record in October CMS:

Option 1: Backend Interface

  1. Log in to the October CMS backend.
  2. Navigate to the desired record (e.g., in the "Records" section).
  3. Click on the record to open its details.
  4. Look for the delete button (usually represented by a trashcan icon).
  5. Click on the delete button to remove the record.

Option 2: Backend List View

  1. Log in to the October CMS backend.
  2. Navigate to the desired record's list view (e.g., in the "Records" section).
  3. Locate the record you want to delete.
  4. Look for the delete button next to the record's details (usually represented by a trashcan icon).
  5. Click on the delete button to remove the record.

Option 3: Code-based Deletion

  1. Access your project's code directory.
  2. Locate the model file representing the record you want to delete.
  3. Inside the model file, find the method responsible for deleting records (usually named "delete" or "destroy").
  4. Implement the necessary parameters and logic to delete the record in the method.
  5. Save the model file and run the specific code segment to trigger the record deletion.

Note: When using the code-based approach, you have more control over the deletion process and can delete multiple records simultaneously by implementing a specific condition or loop.