Documentation

GetMessageList

Description and parameters

record set
CTicket::GetMessageList(

 varchar &by,
 varchar &order,
 array arFilter=array(),
 boolean &is_filtered,
 char(1) CHECK_RIGHTS="Y",
 char(1) get_user_name="Y"

);

Method is designed for getting list of messages in a single query. Non-static method.

Method parameters

ParameterDescriptionAvailable from versionDeleted starting from version
TICKET_ID 3.3.16
byIdentifier allowing to set field name for sorting. The following values are permitted:
  • s_id - по ID
  • s_number - by sequence number
3.3.16
orderSort order. The following values are permitted:
  • desc - by descension
  • asc - by ascension (default value)
3.3.16
arFilter Array for value filtering. Array allows the following indexes:
  • ID - message ID (complex logic is permitted);
  • TICKET_ID - query/ticket ID;
  • TICKET - (complex logic is permitted);
  • IS_MESSAGE - Allows getting list of specific messages. Otherwise, list of queries/tickets will contain a lot of redundant items, such as, status update messages.
  • IS_HIDDEN - "Y" - only hidden messages are selected; "N" - not all hidden message are selected;
  • IS_LOG - "Y" - selects log records only (update records); "N" - selects other records;
  • IS_OVERDUE - "Y" - selects only overdue messages; "N" - selects not overdue messages only;
  • NOT_CHANGE_STATUS - "Y" - selects unedited messages only; "N" - selects edited messages;
  • MESSAGE_BY_SUPPORT_TEAM - "Y" - selects messages from technical support employees; "N" - selects all messages;
  • EXTERNAL_FIELD_1 - (complex logic is permitted)
Optional parameter.
3.3.11
is_filteredVariable is "true" in case the list of results is filtered by a specific criteria; or false otherwise. Updated to isFiltered from version 12.0.03.3.16
CHECK_RIGHTS Flag for required access permission check for current user:
  • Y - selects only the messages available to view by the user (by default)
  • N - selects all messages independently from user access permissions
Optional parameter. Updated to checkRights starting from version 12.0.0
3.3.11
get_user_name Optional parameter. "Y" - when retrieving the message, selects such fields as OWNER_EMAIL, OWNER_LOGIN, OWNER_NAME, CREATED_EMAIL, CREATED_LOGIN, CREATED_NAME, MODIFIED_EMAIL, MODIFIED_LOGIN, MODIFIED_NAME, describing users associated with this message (by default); "N" - abovelisted fields won't be selected, but this will expedite method performance. Updated to getUserName starting from version 12.0.0 3.3.16
old_callOptional parameter. Default value - "N".3.3.153.3.16

Examples

<?
$mess = CTicket::GetMessageList($a, $b, array("TICKET_ID" => $ID, "TICKET_ID_EXACT_MATCH" => "Y"), $c, $CHECK_RIGHTS);
$mess->NavStart(50);
$messages = $mess->SelectedRowsCount();
?>

© «Bitrix24», 2001-2024
Up