Results 1 to 2 of 2

Thread: Cannot multiple select on custom module's select popup

  1. #1
    bstonehill is offline Sugar Community Member
    Join Date
    Nov 2006
    Location
    Atlanta, GA
    Posts
    98

    Default Cannot multiple select on custom module's select popup

    I created a custom module and related it to Accounts so that I have a subpanel for it. When I click select to associate an item to the current account I do not get the checkboxes on the left to make multiple selections like I do in all of the default modules. This is a big problem because I will be associating 10-20 items at a time and doing one at a time I can't really tell which ones I've already added.

    My first thought was that it was because it was a one-to-many relationship, but I checked and it is a many-to-many.

    The other possibility is if I can use mass update to assign multiple items to one account, similar to assigning multiple accounts to a user, but I can't seem to make any modifications to mass update in 5.0.0e. I already tried adding massupdate => false like I did in 4.5.1.

    Any suggestions?

    Thanks in advance

  2. #2
    dpatech is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    NC
    Posts
    287

    Default Re: Cannot multiple select on custom module's select popup

    The problem is that you need to pass the "MultiSelect" parameter in the form definition for open_popup. Look at this example below for selecting multiple Contacts from the Accounts page.


    PHP Code:
    <form action="index.php">
     <
    input type="button" name="select_button" id="select_button" class="button"
     
    title="Select [Alt+T]" accesskey="T" value="Select"
     
    onclick='open_popup("Contacts",600,400,"",true,true,{"call_back_function":"set_return_and_save_background","form_name":"DetailView","field_to_name_array":{"id":"subpanel_id"},"passthru_data":{"child_field":"Contacts","return_url":"index.php%3Fmodule%3DAccounts%26action%3DSubPanelViewer%26subpanel%3DContacts%26record%3D18f9ac99-e1db-926d-9312-47ba35a31008%26sugar_body_only%3D1","link_field_name":"contacts","module_name":"Contacts","refresh_page":"0"}},"MultiSelect",true);' /></form
    You should be able to set this as part of your sub-panel definition as shown below. You have to pass the "mode" parameter as part of the widget data.

    $subpanel_layout = array(
    'top_buttons' => array(
    array('widget_class' => 'SubPanelTopCreateButton'),
    array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Contacts', 'mode'=>'MultiSelect'),
    ),
    - Sugar Team
    dpa Technology LLC
    e-mail: dpaDeveloper@dpatechnology.com
    web: http://www.dpatechnology.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Custom fields in accounts select popup
    By stevec in forum Developer Help
    Replies: 4
    Last Post: 2010-02-17, 03:08 AM
  2. Multiple Select for Custom Modules
    By Fineline in forum Developer Help
    Replies: 5
    Last Post: 2008-03-04, 03:34 PM
  3. upgraded to 4.5.1e, received "Metadata for table tracker does not exist"
    By sfgeorge in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2007-09-03, 02:24 PM
  4. Asterisk Patch 1.1.0 Crash on logon
    By skyracer in forum Help
    Replies: 6
    Last Post: 2006-07-08, 06:30 AM
  5. Replies: 7
    Last Post: 2006-06-06, 07:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •