Documentation

Add

int
CTaskLog::Add(
 array arFields
);

This method adds a new record into the log.

Method parameters

Parameter Description
arFields Array("field"=>"value", ...). Contains values of all log record fields.

Returned value

This method returns the ID for the added, if the adding was successful. When an error occurs, the method will return false, and exceptions will contain errors. 

Examples of use

<?
if (CModule::IncludeModule("tasks"))
{
    $arLogFields = array(
        "TASK_ID" => 76,
        "USER_ID" => 2,
        "CREATED_DATE" => "2011.06-20.17:26:37", // date format must be transferred in the date format on the site.
        "FIELD" => "TITLE",
        "FROM_VALUE" => "Task title",
        "TO_VALUE" => "New task title",
    );
    $log = new CTaskLog();
    $log->Add($arLogFields);
}
?>


© «Bitrix24», 2001-2024
Up