SuiteCRM 8 Issues with Customized Lists

Greetings everyone.
On SuiteCRM 8, I’m trying to add a new custom list to the Leads module using the “create_new_list_query” function and display leads with the status ‘Dead’ in this list.
However, it doesn’t work as expected, as the list still shows the same data as the main list.
In contrast, in SuiteCRM 7, it works well.
Can you please help me?

If you want to get help, you need to be more specific than that… how are you adding the function?

Basically, if you are customizing a legacy view, that won’t work with the new UI. You do have the option of telling SuiteCRM to use legacy view for that module (search these forums for module_routing.yaml to learn how)

There are other ways to customize the new UI, but they involve completely new languages and technologies.

@pgr hello,
Here is how I added it. In the file public/legacy/modules/Leads/Lead.php, I modified the create_new_list_query function like this:

public function create_new_list_query($order_by, $where, $filter=array(), $params=array(), $show_deleted = 0, $join_type='', $return_array = false, $parentbean=null, $singleSelect = false, $ifListForExport = false)
    {
        if(isset($_REQUEST["dead"]) and $_REQUEST["dead"] == "yes")
        {
            $where = "(leads.status = 'Dead')";
        }
        $ret_array = parent::create_new_list_query($order_by, $where, $filter, $params, $show_deleted, $join_type, true, $parentbean, $singleSelect, $ifListForExport);
        return $ret_array;
    }

Afterward, in the file public/legacy/modules/Leads/Menu.php, I added the link to the new list :

if (ACLController::checkAccess('Leads', 'list', true)) {
    $module_menu[]=array("index.php?module=Leads&action=index&return_module=Leads&return_action=DetailView&dead=yes", $mod_strings['LNK_LEAD_LIST_DEAD'],"List", 'Leads');
}

Yeah, that won’t work, unless you go into legacy mode for that module. BTW, you should not be changing the view in the core files, you should be using the extension mechanism from “custom” folder.

Any way, my suggestion is for you to try a different technique:

Since that is based on metadata files, I think (not 100% sure, though) that v8 will respect it. Tell us how it went.