I can't find a solution myself. I want to search for contacts, who are working in a special industry, but the industry is stored in the account. Any solution for that?
I have created a custom module loadable package for you. You should be able to install this using Admin > Module Loader.
Hope this helps!
There would be two solutions to be able to do this:
a. Create a new field in the Contacts module which has the following Calculated formula:
Then add this field to as a Search option for the Contacts module from within Studio. When viewing the List View of the Contacts module, the newly created field should be available as a filter option.
* please note that you will need to Recalculate values for all Contacts initially to allow this to work.
b. Create a Report based on the Contacts module which has a Run-time filter based on Contact >> Account >> Industry. You can then add the required fields for the report and then choose the required industry when viewing the report.
Hope this helps.
Thank you for fast answering. I should have said that I'm using Version 6.5.16 (Build 1082) of sugarcrm, the community edition. So I didn't find a way to use your suggested solution. Is there a way to do it similar?
You should be able to accomplish this by adding the following code-level customizations (3 files in total):
1. In the file:
'query_type' => 'default',
0 => 'accounts.industry',
2. In the file:
'name' => 'account_industry',
'label' => 'LBL_ACCOUNT_INDUSTRY',
'default' => true,
'width' => '10%',
3. In the file (create it if needed):
// created: 2016-04-25 18:21:22
$mod_strings = array (
'LBL_ACCOUNT_INDUSTRY' => 'Industry',
(Only add line 4 if you already have this file created)
4. Run a Quick Repair & Rebuild in Admin > Repairs.
5. You should now have this field available in the Contact Search layout and be able to search on it.
Hope this helps,
wow, that's great. It's a great solution. Works perfect. Thank you very much.
Glad to hear!!
Retrieving data ...