class MyClass { function OnAfterIBlockElementUpdateHandler(&$arFields) { if($arFields["RESULT"]){ CModule::IncludeModule("iblock"); $ID=2;//$arFields["ID"]; $arIBlockElement=GetIBlockElement($ID); AddMessage2Log($arIBlockElement['PROPERTIES']['AUTHOR']['~VALUE']); } else AddMessage2Log("Ошибка изменения записи ".$arFields["ID"]." (".$arFields["RESULT_MESSAGE"].")."); } }
CModule::IncludeModule("iblock"); $ID=2;//$arFields["ID"]; $arIBlockElement=GetIBlockElement($ID); AddMessage2Log($arIBlockElement['PROPERTIES']['AUTHOR']['~VALUE']);
AddEventHandler("iblock", "OnAfterIBlockElementUpdate", Array("MyClass", "OnAfterIBlockElementUpdateHandler"));
AddMessage2Log("asdsdfg");
$res=CIBlockElement::GetProperty(2, 2, "sort", "asc", Array("CODE"=>"AUTHOR")); $arr = $res->Fetch(); AddMessage2Log($arr["VALUE"]);
AddMessage2Log("\nВот эту строку я жду: ".$arIBlockElement['PROPERTIES']['AUTHOR']['~VALUE']);