Add
bool CTaskReminders::Add( array arFields );
This method adds notification for the task.
Method parameters
Parameter | Description |
---|---|
arFields | Array("field"=>"value", ...). |
Returned value
The method returns true, if the adding was successful. When an error occurs, method will return false, and exceptions will contain errors.
Examples of use
<?
if (CModule::IncludeModule("tasks"))
{
$arFields = Array(
"TASK_ID" => 4,
"USER_ID" => 15,
"REMIND_DATE" => "2011-10-21",
"TYPE" => CTaskReminders::REMINDER_TYPE_DEADLINE,
"TRANSPORT" => CTaskReminders::REMINDER_TRANSPORT_EMAIL
);
$obTaskReminders = new CTaskReminders;
$ID = $obTaskReminders->Add($arFields);
$success = ($ID>0);
if($success)
{
echo "Ok!";
}
else
{
if($e = $APPLICATION->GetException())
echo "Error: ".$e->GetString();
}
}?>
© «Bitrix24», 2001-2024