Esempio n. 1
0
 private static function UnregisterLiveFeedEvent($activityID)
 {
     $slEntities = CCrmLiveFeed::GetLogEvents(array(), array('ENTITY_TYPE_ID' => CCrmOwnerType::Activity, 'ENTITY_ID' => $activityID), array('ID'));
     $options = array('UNREGISTER_RELATION' => false);
     foreach ($slEntities as &$slEntity) {
         CCrmLiveFeed::DeleteLogEvent($slEntity['ID'], $options);
     }
     unset($slEntity);
     CCrmSonetRelation::UnRegisterRelationsByEntity(CCrmOwnerType::Activity, $activityID);
 }
Esempio n. 2
0
 private static function UnregisterLiveFeedEvent($invoiceID)
 {
     $invoiceID = intval($invoiceID);
     if ($invoiceID <= 0) {
         return;
     }
     $slEntities = CCrmLiveFeed::GetLogEvents(array(), array('ENTITY_TYPE_ID' => CCrmOwnerType::Invoice, 'ENTITY_ID' => $invoiceID), array('ID'));
     $options = array('UNREGISTER_RELATION' => false);
     foreach ($slEntities as &$slEntity) {
         CCrmLiveFeed::DeleteLogEvent($slEntity['ID'], $options);
     }
     unset($slEntity);
     CCrmSonetRelation::UnRegisterRelationsByEntity(CCrmOwnerType::Invoice, $invoiceID);
 }