Adding Contacts to a Target List from an Account Search

This is driving me mad, hopefully someone can help, point me in the right direction pleaseā€¦

I want to do a mailer to a list of contacts and so an trying to build a Target List.

I have a custom field for Accounts - ā€œFocus - XYZā€

I have done an advanced search for this field a and I have 1,000 Accounts returned.

I can add all these Accounts to a ā€œtarget listā€.

BUT I want the actual CONTACTS who exist under these accounts in the target list - not the parent account itself.

Im my previous CRM I could select all the accounts, then ā€œretrieve contactsā€.

Perhaps the terminology, or way things work is different and im looking at it the wrong way?

Many thanks!

You would need to select the contacts, as this kind of functionality is not out of the box functionality in SuiteCRM.

Thanks,

Will.

Thanks Will, but how do I select / retrieve contacts, from an advanced search made on Accounts?

Hi bjones99,

Option 1:
use the Reporting module and assemble the query based on the Contacts module and adding conditions for the fields to the related accounts module. This way you can recreate your advanced search on accounts, but instead get the related contacts as search result.
You can then add the result of your report to a target list.

Option 2:
Reimplement the custom field in accounts in code (instead of Studio) and add it as a searchable field to the contacts module

A: Add the following files:

Add file


custom/Extension/modules/Accounts/Ext/Vardefs/focus_xyz.php

With contents:


<?php
$dictionary['Account']['fields']['focus_xyz_c'] = array (
		'name' => 'focus_xyz_c',
		'vname' => 'LBL_FOCUX_XYZ',
		'type' => 'enum',
		'len' => '50',
		'default_value' => NULL,
		'mass_update' => '1',
		'reportable' => '1',
		'importable' => 'true',
		'options' => 'focus_xyz_list',
		);

Add file


custom/Extension/modules/Accounts/Ext/Language/en_us.focus_xyz.php

with contents:


<?php 
$mod_strings['LBL_FOCUS_XYZ'] = 'Focus XYZ';

Add file


custom/Extension/modules/Contacts/Ext/Vardefs/focus_xyz.php

With contents:


<?php
$dictionary['Contact']['fields']['account_name']['join_link_name'] = 'accounts_contacts_link';

$dictionary['Contact']['fields']['account_focus_xyz'] = array (
		'name' => 'account_focus_xyz',
		'rname' => 'focus_xyz_c',
		'id_name' => 'account_id',
		'vname' => 'LBL_ACCOUNT_FOCUS_XYZ',
		'join_name'=>'accounts',
		'join_link_name'=>'accounts_contacts_link',
		'type' => 'relate',
		'link' => 'accounts',
		'table' => 'accounts',
		'isnull' => 'true',
		'module' => 'Accounts',
		'dbType' => 'varchar',
		'len' => '255',
		'source' => 'non-db',
		'unified_search' => true,
		'massupdate' => false,
		);

Add file


custom/Extension/modules/Contacts/Ext/Language/en_us.focus_xyz.php

with contents:


<?php 
$mod_strings['LBL_ACCOUNT_FOCUS_XYZ'] = 'Focus XYZ';

B: Do a ā€œQuick repair and rebuildā€

C: Open studio, Contacts, Advanced Search and add Focus XYZ to the search fields.

D: Search your contacts by doing an advanced search on Contacts using the available focus search field

You will of course need to migrate the data from the former custom field to the new custom field, like


update accounts as a, accounts_cstm as ac set a.focus_xyz_c = ac.focus_xyz_c where a.id = a.id_c;

Regards,
Jan Siero

If you are open to using this add-on you can add any number of records to a target list.

Hello Friends,

When I am clicking on ā€˜Contactsā€™ subpanel > Select:

After making the required field searchable and making the query, I can see all the records I am interested in:

When I select them all, and click on ā€˜Selectā€™ no record is added to the Contacts subpanel.

Can you help me in doing this?

RK

Dear Friends,

I could add upto 200 records when I select the 200 records per page in system settings. However, if I increase the number to 500 or more, the matching number of records are shown well in search results, but when I attempt to select them all and click on button ā€˜Selectā€™, same ā€¦nothing happens.

Can you please help me sorting this glitch?

RK