Maybe Iām just not seeing it. Is there a way to filter TARGETS in the list view by converted/unconverted?
In LEADS thereās a field for āstatusā and you can filter by In Process, Converted, New, etc.
There doesnāt seem to be this functionality in TARGETS. I guess I could create a custom field, but TARGETS already keep track of what is converted/not itās just thereās no obvious way of adding it to the filter. Am I missing something obvious?
pgr
16 October 2020 18:25
2
Hi!
I donāt see a converted field in the database for Targetsā¦
It must be checking if it is already converted using some other mechanism. Possibly itās checking if there is a relationship to a Lead?
@pstevens
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',),
...
2 Likes
Cool! Iām going to try that. Thanks!