CPosting::Update( $ID, $arFields );
The method Update updates the issue properties by its ID.
Parameter | Description |
---|---|
$ID | The issue ID. |
$arFields | Associated array containing the keys and values of the
Issue object fields. The following fields can also be used:
|
Returns true on success. In case of an error, it returns false and the class variable LAST_ERROR contains the error description.
$posting = new CPosting; $arFields = Array( "FROM_FIELD" => $FROM_FIELD, "TO_FIELD" => $TO_FIELD, "BCC_FIELD" => $BCC_FIELD, "EMAIL_FILTER" => $EMAIL_FILTER, "SUBJECT" => $SUBJECT, "BODY_TYPE" => ($BODY_TYPE <> "html"? "text":"html"), "BODY" => $BODY, "DIRECT_SEND" => ($DIRECT_SEND <> "Y"? "N":"Y"), "CHARSET" => $CHARSET, "SUBSCR_FORMAT" => ($SUBSCR_FORMAT<>"html" && $SUBSCR_FORMAT<>"text" ? false : $SUBSCR_FORMAT), "RUB_ID" => $RUB_ID, "GROUP_ID" => $GROUP_ID ); if($STATUS <> "") { if($STATUS<>"S" && $STATUS<>"E" && $STATUS<>"P") $STATUS = "D"; $arFields["STATUS"] = $STATUS; if($STATUS == "D") { $arFields["DATE_SENT"] = false; $arFields["SENT_BCC"] = ""; $arFields["ERROR_EMAIL"] = ""; } } if(!$posting->Update($ID, $arFields)) $strError = $posting->LAST_ERROR;
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |