AddEventHandler("iblock", "OnBeforeIBlockElementDelete", Array("MyClass", "OnBeforeIBlockElementDeleteHandler"));
class MyClass
{
function OnBeforeIBlockElementDeleteHandler($ID)
{
$res = CIBlockElement::GetByID($ID);
if($arItem = $res->GetNext()){
\Bitrix\Main\Diag\Debug::dumpToFile($arItem, 'arItem');
}
}
}