The method GetMessageList obtains a list of messages in one ticket.
||Identifier specifying the name of the field by which sorting is to be
performed. The following values are possible:
- s_id - by the ID;
- s_number - by the ordinal.
||Sort order. One of the following values is possible:
- desc - descending (default);
- asc - ascending.
||An array used to filter values. The following keys are possible:
- ID - the message ID (complex
- ID_EXACT_MATCH - set to "Y" for exact match searches when
filtering by the message ID (default). If "N", the method
performs loose searches (entry is sufficient) when
filtering by the message ID;
- TICKET_ID - the ticket ID (complex
- TICKET_ID_EXACT_MATCH - set to "Y" for exact match searches when
filtering by the ticket ID (default). If "N", the method performs
loose searches (entry is sufficient) when
filtering by the ticket ID;
- IS_HIDDEN - if set to "Y", only the hidden tickets are selected.
If "N", all the non-hidden tickets are selected;
- IS_LOG - if set to "Y", only the log history records are
selected; if "N", only the existing records are selected;
||On return, this variable contains true if the returned list of contracts is
filtered by any above criteria, or false otherwise.
||Flag specifies that the current user permissions should be checked:
- Y - only the messages the current user can view are returned (default);
- N - all messages regardless of the current
user permissions are returned.
||If set to "Y", the following fields describing the parameters of
users related to this message are also returned when selecting messages:
If "N", all the above fields are not returned which speeds up the
$mess = CTicket::GetMessageList($a, $b, array("TICKET_ID" => $ID, "TICKET_ID_EXACT_MATCH" => "Y"), $c, $CHECK_RIGHTS);
$messages = $mess->SelectedRowsCount();