Custom Module to Target Lists

Hello guys,

I have been really struggling with a situation here. I found the code to do it using SugarCRM Pro version, but it doesn’t seem to work with SuiteCRM, that’s why I’m pinging you using the Community.

It happens that I had to create two separate people modules, but I can’t get the Target Lists to be able to pick people from those 2 modules, only from the predefine Contacts and Leads modules (as well as Users and Targets).

Can you provide some guidance on this please?

I am also facing this problem. Did you get any solution for it?
Thanks.

Hi, same problem here. I’ve created a many to many relationship in studio, between CustomModule and Target Lists. This works, I’ve my subpanel in Target Lists, and I can select my items. But if I use this list in a campaign, and send emails, my target list looks like it is empty (Target in list 0 ) and no email is sent.

So any idea? This occurs before EmailMan activation.

To solve this problem, I initially followed this guide http://www.enablecrm.co.uk/resources/blog/sugarcrm-how-to/how-add-campaigntarget-list-support-custom-person-module-sugarcrm, but it didn’t work for me; so I decided to create a logical hook triggered when you insert an item in a target list. In the hook I’ve inserted something like :

$query = “INSERT INTO prospect_lists_prospects “.
“(id,prospect_list_id,related_id,related_type,date_modified,deleted) “.
“values “.
“(’”.create_guid().”’,”.
“’”.$bean->id.”’,”.
“’”.$arguments[‘related_id’].”’,”.
“’”.$arguments[‘related_module’]."’,".
“’”.gmdate(‘Y-m-d H:i:s’)."’,".
“0)”;
$result = $db->query($query);

And this solves the problem.

Regards

1 Like

I’m having this issue right now. I’ve created a custom module and want to add contact from the custom module to the target list but it’s not working in the campaign, it says the target list is empty. Any update on this? I’m not a developer, so I’m not sure where to add the code you listed. Can you point me in the right direction.