Documentation

GetMessageByID

Description and parameters

record set
CTicket::GetMessageByID(

 int ID,
 char(1) CHECK_RIGHTS="Y",
 char(1) get_user_name="Y"

);

Method returns data for a single query. Non-static method.

Method parameters

ParameterDescriptionAvailable from version
ID Message ID.
CHECK_RIGHTS "Y" - retrieves the message only when user has access permissions for such message (by default); "N" - message will be retrieved independently from current user access permissions. Optional parameter. Updated to checkRights starting from version 12.0.0
get_user_name "Y" - when getting a message, retrieves such fields as OWNER_EMAIL, OWNER_LOGIN, OWNER_NAME, CREATED_EMAIL, CREATED_LOGIN, CREATED_NAME, MODIFIED_EMAIL, MODIFIED_LOGIN, MODIFIED_NAME, describing user parameters associated with this message (by default); "N" - abovelisted fields won't be retrieved, but this will increase method performance. Optional parameter.

Example

Example of array of a single string, returned by the method CTicket::GetMessageByID

Array
(
    [ID] => 3585
    [TIMESTAMP_X] => 27.04.2004 12:46:02
    [DATE_CREATE] => 13.04.2004 11:57:04
    [C_NUMBER] => 22
    [TICKET_ID] => 647
    [MESSAGE] => Ok, how about such an idea: if a group is specified in an uploaded file, it's activated (such behaviour can be adjusted when creating a data upload). 
I remember the following: you can deactivate the category (corresponding checkmark is available when creating such layout), but you cannot activate it.
Resulting behaviour is different. I would've wanted the same behaviour.
    [MESSAGE_SEARCH] =>  OK, HOW ABOUT SUCH AN IDEA: IF A GROUP IS SPECIFIED IN AN UPLOADED FILE, IT'S ACTIVATED (SUCH BEHAVIOUR CAN BE ADJUSTED WHEN CREATING A DATA UPLOAD). 
I REMEMBER THE FOLLOWING: YOU CAN DEACTIVATE THE CATEGORY (CORRESPONDING CHECKMARK IS AVAILABLE WHEN CREATING SUCH LAYOUT), BUT YOU CANNOT ACTIVATE IT.
RESULTING BEHAVIOUR IS DIFFERENT. I WOULD'VE WANTED THE SAME BEHAVIOUR.
    [IMAGE] => 996
    [OWNER_USER_ID] => 166
    [OWNER_GUEST_ID] => 16218
    [OWNER_SID] => 
    [SOURCE_ID] => 0
    [CREATED_USER_ID] => 166
    [CREATED_GUEST_ID] => 16218
    [CREATED_MODULE_NAME] => support
    [MODIFIED_USER_ID] => 2
    [MODIFIED_GUEST_ID] => 6221
    [OWNER_EMAIL] => mail@server.com
    [OWNER_LOGIN] => ant
    [OWNER_NAME] => John Smith
    [CREATED_EMAIL] => mail@server.com
    [CREATED_LOGIN] => ant
    [CREATED_NAME] => John Smith
    [MODIFIED_EMAIL] => mail@server.com
    [MODIFIED_LOGIN] => nessy
    [MODIFIED_NAME] => John Carpenter
)

© «Bitrix24», 2001-2024
Up