Views: 1962 (Data available since 06.02.2017)
Attention! Prior to modifying module operation (i.e. modifying system kernel) you must be sure that there is no other way to resolve your task. All changes that you add will be eliminated upon the next update of the product, and you will have to make them again.
Let us solve the task of downloading contacts from a corporate portal to Outlook 2003. Please remember that Bitrix24 Self-hosted in a standard package is intended for interaction with Outlook 2007.
The file /bitrix/modules/intranet/classes/general/ws_contacts.php is responsible for forming and preparing data for Outlook.
There are two standard problems:
- Avatars are not downloaded to Outlook 2003 - and an error occurs at once.
- Sometimes the companies, where the users work, are not downloaded (the field Organization in Outlook).
We solve the first problem using the function
__getRow($arRes, $listName, &$last_change). Commenting on the strings of image attribute setup:
/*if ($this->bGetImages && $arRes['PERSONAL_PHOTO'] > 0)
$arImage = CIntranetUtils::InitImage($arRes['PERSONAL_PHOTO'], 100, 100);
$obRow->setAttribute('ows_Attachments', ';#'.($APPLICATION->IsHTTPS() ? 'https://' : 'http://')
$obRow->setAttribute('ows_MetaInfo_AttachProps', '<File Photo="-1">'.$arImage['FILE']['FILE_NAME'].'</File>');
We solve the second problem using the function
GetListItemChangesSinceToken($listName, $viewFields = '', $query = '', $rowLimit = 0, $changeToken = ''). In the cycle while
while ($arUser = $obUsers->NavNext()) we comment on all strings starting with
(i.e. where the value of this attribute changes).
Note: In the function
GetList the attribute diagram is formed. If before the line:
return array('GetListResult' => $data); the array
$data is displayed, we will have a chance to see the downloading diagram.