Hello everyone,
In SuiteCRM 8, how do we make additional fields (such as description) or Custom fields within modules searchable?
Thanks!
Hello everyone,
In SuiteCRM 8, how do we make additional fields (such as description) or Custom fields within modules searchable?
Thanks!
Hi @Yar
If I need to create a Custom Field, I go to Admin >> Developer Tools >> Studio
In Studio you will be able to customize any module fields (such as description), layouts and relationships.
You can also translate what each field will show in different languages for the titles and the placeholders.
I did look into there but didnt see the option, as an example, i went to Studio > Contacts > Fields > Description but there is no option to make it searchable. We did create custom Fields as well but dont see the option to make them searchable.
See the screenshot below:
Thanks for looking into this @domiserver
Hi @Yar
I always make sure I SAVE & DEPLOY the new fields.
In Studio > Contacts > Layouts > Filter, select: Quick Filter or Advanced Filter.
Inside the filter chosen, you can select the new field for the DEFAULT column and the search layout you want to be shown.
Then the âSearch Forms will contain fields chosen for filtering recordsâ
Thanks @domiserver .
I did go into Quick Filter, add Description to the default column under Leads, clicked Saved and Deploy, however, when I do a search, it doesnt seem to search in the Leadâs description.
Hi @Yar
Did you Check and repair SuiteCRM after making those changes?
Go to Admin > Admin Tools > Repair >> Quick Repair and Rebuild
Here you will ârepair and rebuild the Database, Extensions, Vardefs and SuiteCRM Dashletsâ including the new field.
Just did and it seems it didnt work.
Will continue to look around.
Thanks for your assistance @domiserver , it is greatly appreciated.
Hey
I tried to add description in Advanced Search from studio and it Worked. it shows the description in the filters. I did do a hard refresh on the Leads listview page using Ctrl+F5.
Also the default search on text works as
description like '{search_value}%'
if you want to search within description text you need to add the extra % yourself
For Example
letâs say a lead has description as 12345
if you search 123 the lead will appear
if you search 234 the lead will not appear
if you search %234 the lead will appear
Thanks @abuzarfaris for your response.
Can you provide screenshots for your configuration so i can attempt to replicate it? Please note I am using SuiteCRM 8.1.3.
Thanks again for your assistance.
I also noticed that you post a screenshot of quick filter
In Suitecrm 8 you have to edit The advanced filter because quick filter is no longer used
Hi @Yar
Thanks again for your time @domiserver .
I did follow your recommended steps but doesnt seem to work.
I did save and deploy and I did log out and logged back in.
Thanks for looking into this. - Suite CRM Version is 8.1.3
My Apologies I was thinking you are doing a module filter
For enabling description in unified search you need to modify the âpublic/legacy/custom/modules/Leads/metadata/SearchFields.phpâ file
if it does not exist copy it from
âpublic/legacy/modules/Leads/metadata/SearchFields.phpâ
add
'description' =>
array (
'query_type' => 'default',
'force_unifiedsearch'=>true
),
in the $searchFields['Leads']
array
Do a repair and rebuild and the CRM will start searching in the Description column as well
That did the trick @abuzarfaris !!
Thanks for your assistance and time!
One last question, when an upgrade is processed, do we need to redo this?
What kind of changes need to be re-entered when SuiteCRM is upgraded?
All of these changes are upgrade safe
A simple check for changes is that if you did changes in the custom folder or via studio they are upgrade safe
This doesnât seem to have worked for me. I added it below account name:
$searchFields[âLeadsâ] =
array(
âfirst_nameâ => array(âquery_typeâ => âdefaultâ),
âlast_nameâ => array(âquery_typeâ => âdefaultâ),
âsearch_nameâ => array(
âquery_typeâ => âdefaultâ,
âdb_fieldâ => array(âfirst_nameâ, âlast_nameâ),
âforce_unifiedsearchâ => true
),
âaccount_nameâ => array(âquery_typeâ => âdefaultâ, âdb_fieldâ => array(âleads.account_nameâ)),
/âacc_name_from_accountsâ => array(âquery_typeâ=>âdefaultâ,ârelated_fieldâ=>âaccount_nameâ),/
âlead_sourceâ => array(
âquery_typeâ => âdefaultâ,
âoperatorâ => â=â,
âoptionsâ => âlead_source_domâ,
âtemplate_varâ => âLEAD_SOURCE_OPTIONSâ
),
/** Start /
âdescriptionâ =>
array (
âquery_typeâ => âdefaultâ,
âforce_unifiedsearchâ=>true
),
/* Stop */
âdo_not_callâ => array(âquery_typeâ => âdefaultâ, âoperatorâ => â=â, âinput_typeâ => âcheckboxâ),
âphoneâ => array(
âquery_typeâ => âdefaultâ,
âdb_fieldâ => array(âphone_mobileâ, âphone_workâ, âphone_otherâ, âphone_faxâ, âphone_homeâ)
),
Then did a âQuick Repair and Rebuildâ, and I still canât search on the description. I have a record that has âSAPâ in the Description and search for both SAP and %SAP and the contact record isnât returned.
What am I doing wrong?
BTW, I removed the comment before/after, rebuilt and tried again, just in case I messed that up, but same result, it still doesnât work.
Ok, one more update. First off, I realized I was working on âLeadsâ when I wanted to search description in âContactsâ, so I changed to the /suitecrm/modules/Contacts/metadata directory and added the following:
$searchFields[âContactsâ] =
array(
âfirst_nameâ => array(âquery_typeâ => âdefaultâ),
âlast_nameâ => array(âquery_typeâ => âdefaultâ),
'descriptionâ => array (âquery_typeâ => âdefaultâ, âforce_unifiedsearchâ=>true ),
âsearch_nameâ => array(
But that now returned an error when I tried to do a search. At least now I know Iâm in the right area, but how do I make this work?