orange office

The Blog

Our thoughts on technology

GX5 Blogs

Catch up on the latest technology news from our in house writers.

Display 'Add to Target List' for custom module on SugarCRM 7

Display 'Add to Target List' for custom module on SugarCRM 7

We wrote recently about customising your custom module for Campaigns in our post 'Using SugarCRMs campaign module with a custom module'. This post will allow you to display the 'Add To Target List' on the list view drop down on SugarCRM 7.

To begin, follow the steps detailed in our previous blog post. If you already have, you can begin customising straight away.

  1. Add the field descriptor for the new button. Open ./modules/modulename/clients/base/views/recordlist/recordlists.php
    array(
                    'name' => 'addtolist_button',
                    'type' => 'button',
                    'label' => 'LBL_ADD_TO_PROSPECT_LIST_BUTTON_LABEL',
                    'primary' => true,
                    'events' => array(
                        'click' => 'list:massaddtolist:fire',
                    ),
                    'acl_module' => 'ProspectLists',
                    'acl_action' => 'edit',
                ),
    
  2. Add a new field to load the target lists. Open ./modules/modulename/vardefs.php. Under the fields array, add:
    'prospect_lists_name' => array(
                'name' => 'prospect_lists_name',
                'type' => 'link',
                'relationship' => 'prospectlists_modulename_1',
                'module' => 'ProspectLists',
                'source' => 'non-db',
                'vname' => 'LBL_PROSPECT_LIST',
            ),
    Replace prospectslists_modulename_1 with the name of the relationship between your module and Target Lists module.

  3. Run Quick Repair and you should be able to add a selection of records from your custom module to a target lists.

For SugarCRM consulting, use our contact form or request a call back.

Share this article:

Continue reading
5615 Hits
0 Comments

Using SugarCRMs campaign module with a custom module.

Using SugarCRMs campaign module with a custom module.

This post will show you an easy and sure fire way to get your custom person module working with SugarCRMs campaign and target list module. This has been tested in Sugar version 7.2

Please note that you will need to have a access to the SugarCRM files to be able to complete this tutorial successfully.

Share this article:

Continue reading
6258 Hits
0 Comments