GetByID
Description and parameters
record set
CTicket::GetByID(
int ID,
char(2) lang=LANG,
char(1) CHECK_RIGHTS="Y",
char(1) get_user_name="Y",
char(1) get_dictionary_name="Y"
);
Method returns data for a single query. Non-static method.
Method parameters
Parameter | Description | Available from version |
---|---|---|
ID | Query/ticket ID. | |
lang | Language two-character code in the format to retrieve query time parameters (time created, updated, closed); optional parameter, by default - current site code. | |
CHECK_RIGHTS | Optional parameter. "Y" - retrieves only the queries that can be viewed by the current user (by default); "N" - get all qгукшуы independently from current user access permissions. Updated to checkRights from version 12.0.0 | |
get_user_name | Optional parameter. "Y" - also retrieves such fields as OWNER_LOGIN, OWNER_NAME, RESPONSIBLE_LOGIN, RESPONSIBLE_NAME, MODIFIED_LOGIN, MODIFIED_NAME, LAST_MESSAGE_LOGIN, LAST_MESSAGE_NAME, CREATED_LOGIN, CREATED_EMAIL, CREATED_NAME, describing user parameters associated with this query (by default); "N" - abovelisted fields won't be retrieved, but this will increase method performance. | |
get_dictionary_name | Optional parameter. "Y" - also retrieves such fields as CATEGORY_NAME, CATEGORY_SID, CRITICALITY_NAME, CRITICALITY_SID, STATUS_NAME, STATUS_SID, MARK_NAME, MARK_SID, SOURCE_NAME, SOURCE_SID, describing technical support directory fields (by default); "N" - abovelisted fields won't be retrieved, but this will increase method performance. Deleted from version 4.0.6 | |
bAdmin | Optional parameter. Default value - "N". | |
get_extra_names | Optional parameter. Default value - "Y". | |
arParams | Optional parameter. |
Example
Example of array of a single retrieved string, returned by the method CTicket::GetByID
Array ( [ID] => 647 [LID] => en [DATE_CREATE] => 17.03.2004 15:27:05 [TIMESTAMP_X] => 19.04.2004 13:37:30 [DATE_CLOSE] => [AUTO_CLOSED] => [AUTO_CLOSE_DAYS] => [CATEGORY_ID] => 27 [CRITICALITY_ID] => 8 [STATUS_ID] => 14 [MARK_ID] => 21 [SOURCE_ID] => [TITLE] => Import-export into commercial catalog [MESSAGES] => 30 [OWNER_USER_ID] => 166 [OWNER_GUEST_ID] => 14649 [OWNER_SID] => [CREATED_USER_ID] => 166 [CREATED_GUEST_ID] => 14649 [CREATED_MODULE_NAME] => support [RESPONSIBLE_USER_ID] => 12 [MODIFIED_USER_ID] => 166 [MODIFIED_GUEST_ID] => 16218 [MODIFIED_MODULE_NAME] => support [LAST_MESSAGE_USER_ID] => 166 [LAST_MESSAGE_GUEST_ID] => 16218 [LAST_MESSAGE_SID] => [SUPPORT_COMMENTS] => [OWNER_LOGIN] => ant [OWNER_EMAIL] => mail@server.com [OWNER_NAME] => John Smith [RESPONSIBLE_LOGIN] => wizard [RESPONSIBLE_EMAIL] => mail@server.com [RESPONSIBLE_NAME] => Frederick WIlson [MODIFIED_LOGIN] => ant [MODIFIED_EMAIL] => mail@server.com [MODIFIED_NAME] => John Smith [LAST_MESSAGE_LOGIN] => ant [LAST_MESSAGE_EMAIL] => mail@server.com [LAST_MESSAGE_NAME] => John Smith [CREATED_LOGIN] => ant [CREATED_EMAIL] => mail@server.com [CREATED_NAME] => John Smith [CATEGORY_NAME] => Installation and setup [CATEGORY_DESC] => [CATEGORY_SID] => [CRITICALITY_NAME] => Medium [CRITICALITY_DESC] => [CRITICALITY_SID] => middle [STATUS_NAME] => In progress [STATUS_DESC] => [STATUS_SID] => [MARK_NAME] => Answer is satisfactory [MARK_DESC] => [MARK_SID] => [SOURCE_NAME] => [SOURCE_DESC] => [SOURCE_SID] => [LAMP] => yellow )
© «Bitrix24», 2001-2024