Module Prospects has the field ālead_idā. It has id of Lead after converting.
I found one interesting, standard and working way.
- copy files:
- modules/Prospects/metadata/SearchFields.php --> custom/modules/Prospects/metadata/SearchFields.php
- modules/Prospects/metadata/searchdefs.php --> custom/modules/Prospects/metadata/searchdefs.php
- Add code to files
- custom/modules/Prospects/metadata/SearchFields.php:
...
$searchFields['Prospects'] =
array(
// add code start
'open_only_lead_conv' => array(
'query_type'=>'format',
'operator' => 'subquery',
'subquery' => "SELECT prospects.id FROM prospects
WHERE prospects.deleted = 0
and prospects.lead_id IS NOT NULL",
'db_field'=>array('id')
),
// add code finish
...
- custom/modules/Prospects/metadata/searchdefs.php
...
'layout' => array(
'basic_search' => array(
array('name' => 'search_name', 'label' => 'LBL_NAME', 'type' => 'name'),
array('name' => 'current_user_only', 'label' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'),
// add line
array('name' => 'open_only_lead_conv','label' => 'LBL_CONVERTED_LEAD','type' => 'bool',),
...