Is there any way to remove completed Tasks from the Task List without actually deleting the task? i.e. so it remains in the history of the associated account.
Is there any way to remove completed Tasks from the Task List without actually deleting the task? i.e. so it remains in the history of the associated account.
Hello,
You can override function create_new_list_query to eliminate the data you want from the list view of tasks without deleting the tasks.
Thumbs up.
Skype ID - david__boris
SugarForge Projects:
WYSIWYG now in studio!(Version 1.1 is out now!)
Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.
Fab Tools! > Dashlet Not Followed Opportunities for past six Months
this topic shows how to modify the where clause of the list view query, the first post worked for me
http://www.sugarcrm.com/forums/showthread.php?t=58494
create a file called view.list.php in custom/modules/Tasks/views (if folder does not exist create it)
with contents
ALWAYS test on a copy of your install first not the live serverPHP Code:<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/MVC/View/views/view.list.php');
class TasksViewList extends ViewList{
function TasksViewList()
{
parent::ViewList();
}
/*
* Override listViewProcess with addition to where clause to exclude project templates
*/
function listViewProcess()
{
$this->processSearchForm();
// RETRIEVE TASKS WHERE THEY ARE NOT COMPLETED
if ($this->where != "")
$this->where .= ' and status <> "Completed" ';
else
$this->where .= 'status <> "Completed"';
$this->lv->searchColumns = $this->searchForm->searchColumns;
if(!$this->headers)
return;
if(empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false)
{
$this->lv->setup($this->seed, 'include/ListView/ListViewGeneric.tpl', $this->where, $this->params);
$savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : (' - ' . $_REQUEST['saved_search_select_name']);
echo get_form_header($GLOBALS['mod_strings']['LBL_LIST_FORM_TITLE'] . $savedSearchName, '', false);
echo $this->lv->display();
}
}
}
?>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks