/** * This method is only for rest purposes */ public function deleteFile($attachmentId) { Attachment::delete($this->getId(), $attachmentId, array('USER_ID' => $GLOBALS['USER']->GetId(), 'ENTITY_ID' => UserField::getTargetEntityId(), 'FIELD_NAME' => 'UF_TASK_WEBDAV_FILES')); // drop cache $this->markCacheAsDirty(); }