- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/general/sonet_subscription.php
- Класс: \CAllCrmSonetSubscription
- Вызов: CAllCrmSonetSubscription::EnsureAllResponsibilityImported
static function EnsureAllResponsibilityImported($userID, $reset = false)
{
$userID = intval($userID);
if($userID <= 0)
{
$userID = CCrmSecurityHelper::GetCurrentUser();
}
$reset = (bool)$reset;
$optionName = 'sl_subscr_import';
if($reset || CUserOptions::GetOption('crm', $optionName, 'N', $userID) !== 'Y')
{
self::EnsureResponsibilityImported(CCrmOwnerType::Lead, $userID);
self::EnsureResponsibilityImported(CCrmOwnerType::Contact, $userID);
self::EnsureResponsibilityImported(CCrmOwnerType::Company, $userID);
self::EnsureResponsibilityImported(CCrmOwnerType::Deal, $userID);
self::EnsureResponsibilityImported(CCrmOwnerType::Activity, $userID);
CUserOptions::SetOption('crm', $optionName, 'Y', false, $userID);
}
}