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"
);
The method GetMessageList obtains a list of messages in one ticket.
Parameters
Parameter | Description |
by |
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.
|
order |
Sort order. One of the following values is possible:
- desc - descending (default);
- asc - ascending.
|
arFilter |
An array used to filter values. The following keys are possible:
- ID - the message ID (complex
logic allowed);
- 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
logic allowed);
- 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;
|
is_filtered |
On return, this variable contains true if the returned list of contracts is
filtered by any above criteria, or false otherwise. |
CHECK_RIGHTS |
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.
|
get_user_name |
If set to "Y", the following fields describing the parameters of
users related to this message are also returned when selecting messages:
- OWNER_EMAIL
- OWNER_LOGIN
- OWNER_NAME
- CREATED_EMAIL
- CREATED_LOGIN
- CREATED_NAME
- MODIFIED_EMAIL
- MODIFIED_LOGIN
- MODIFIED_NAME
If "N", all the above fields are not returned which speeds up the
method execution.
|
Example
<?
$mess = CTicket::GetMessageList($a, $b, array("TICKET_ID" => $ID, "TICKET_ID_EXACT_MATCH" => "Y"), $c, $CHECK_RIGHTS);
$mess->NavStart(50);
$messages = $mess->SelectedRowsCount();
?>