Views: 3209
Last Modified: 30.03.2022

Use the delete() method for deletion:

// delete record
$book = \Bitrix\Main\Test\Typography\BookTable::getByPrimary(1)
	->fetchObject();

$book->delete();

// deleting by primary key
$book = \Bitrix\Main\Test\Typography\Book::wakeUp(1);

$book->delete();

First only the record for this object is deleted from the database. When you need to delete or attempt to perform other actions with bindings, you will need direct actions.

Deleting using the self-titled method of Table-class, triggers all the required Events. That's why additional action can be described in the event handler onDelete.





Courses developed by Bitrix24