$action = strtolower($form . '_' . $action);
} else {
    $action = strtolower($action);
}
switch ($action) {
    case 'delete':
    case 'undelete':
        //Debug::setVerbosity( 11 );
        if (strtolower($action) == 'delete') {
            $delete = TRUE;
        } else {
            $delete = FALSE;
        }
        if (DEMO_MODE == FALSE and ($permission->Check('schedule', 'delete') or $permission->Check('schedule', 'delete_own') or $permission->Check('schedule', 'delete_child'))) {
            $slf = new ScheduleListFactory();
            $slf->StartTransaction();
            $slf->getByCompanyIdAndId($current_company->getID(), $ids);
            if ($slf->getRecordCount() > 0) {
                foreach ($slf as $s_obj) {
                    $s_obj->setDeleted(TRUE);
                    $s_obj->Save();
                }
            }
            //$plf->FailTransaction();
            $slf->CommitTransaction();
        }
        Redirect::Page(URLBuilder::getURL(array('saved_search_id' => $saved_search_id), 'ScheduleList.php'));
        break;
    case 'search_form_delete':
    case 'search_form_update':
    case 'search_form_save':