Hi,
is it possible to filter Lead values in the global search, hiding records that have âConvertedâ value in the Status field?
Using Studio seems to me you canât do
You could do that with this enhancement
which I never made a PR for
Hi PGR,
in â/custom/modules/Leads/metadata/searchdefs.phpâ I entered:
âwhereClauseâ => âAND (leads.status <> âConvertedâ)â,
precisely in
$ searchdefs [âLeadsâ] =
array (
âlayoutâ => (
âŚ
)
âwhereClauseâ => âAND (leads.status <> âConvertedâ)â,
âtemplateMetaâ =>
array (âŚ)
I did the repair operation.
But the filter doesnât work⌠did I put it in wrong?
Hi PGR, it works, I missed to add the code to the modules/Home/UnifiedSearchAdvanced.php file too.
Is there any way to make this change secure for upgrades?
I think the best would be for this enhancement to go into coreâŚ
Do you mean that for now it is not possible to restore the modification to the UnifiedSearchAdvanced.php file in /custom/?
It might be, I didnât try it, to be honest.
Tell me how it goes
Hello PGR,
I think it canât be done⌠I asked on a similar post ( https://community.suitecrm.com/t/how-to-override-email-module-file/68260/5?u=web_elinet ) and it seems you canât extend the functionalityâŚ
Youâll have to insert it in the coree when I update it, Iâll have to remember to reload the changesâŚ
Hi @web_elinet
Upgrade safe
Copy these files:
- modules\Home\UnifiedSearch.php
- modules\Home\UnifiedSearchAdvanced.php
to:
custom\modules\Home
in this file: - modules\Home\UnifiedSearch.php
change
line 54 (ish)
require_once(âmodules/Home/UnifiedSearchAdvanced.phpâ);
to
require_once(âcustom/modules/Home/UnifiedSearchAdvanced.phpâ);
I have a PHP switch case based on a value in records and current user profile that goes an extra level beyond security groups.
I added the switch case variables and the âwhereClauseâ to the module searchdefs and
viola, search restricted based on current user values.