Results 1 to 6 of 6

Thread: HOW TO build Quick Create subpanel in custom module

  1. #1
    kinshibuya's Avatar
    kinshibuya is offline A Sugar Hero
    Join Date
    Jul 2008
    Location
    brasil
    Posts
    521

    Default HOW TO build Quick Create subpanel in custom module

    HOW TO build Quick Create subpanel in custom module

    I need to quick create in subpanel how to do that?

  2. #2
    matthew's Avatar
    matthew is offline Sugar Team Member
    Join Date
    Jul 2005
    Posts
    533

    Default Re: HOW TO build Quick Create subpanel in custom module

    Quick Create's use the metadata framework too. For an example, take a look at ./modules/Contacts/metadata/quickcreatedefs.php

    Sugar University for training
    Sugar Wiki for developer and user help
    SugarForge for modules, themes, lang packs
    SugarExchange for production-ready extensions
    Enter/view bugs via the Sugar bug tracker

  3. #3
    kinshibuya's Avatar
    kinshibuya is offline A Sugar Hero
    Join Date
    Jul 2008
    Location
    brasil
    Posts
    521

    Default Re: HOW TO build Quick Create subpanel in custom module

    Hi! I added the file quickcreatedefs.php on my module an yet i got nothing!

    here's the code:

    Code:
    $viewdefs = array (
      'COT_Cotas' => 
      array (
        'QuickCreate' => 
        array (
          'templateMeta' => 
          array (
            'form' => 
            array (
              'hidden' => 
              array (
                0 => '<input type="hidden" name="opportunity_id" value="{$smarty.request.opportunity_id}">',
                1 => '<input type="hidden" name="case_id" value="{$smarty.request.case_id}">',
                2 => '<input type="hidden" name="bug_id" value="{$smarty.request.bug_id}">',
                3 => '<input type="hidden" name="email_id" value="{$smarty.request.email_id}">',
                4 => '<input type="hidden" name="inbound_email_id" value="{$smarty.request.inbound_email_id}">',
                5 => '<input type="hidden" name="reports_to_id" value="{$smarty.request.contact_id}">',
                6 => '<input type="hidden" name="report_to_name" value="{$smarty.request.contact_name}">',
    
    
    
              ),
            ),
            'maxColumns' => '2',
            'widths' => 
            array (
              0 => 
              array (
                'label' => '10',
                'field' => '30',
              ),
              1 => 
              array (
                'label' => '10',
                'field' => '30',
              ),
            ),
          ),
    'panels' => 
        array (
          'default' => 
          array (
            0 => 
            array (
              0 => 
              array (
                'name' => 'assigned_user_name',
                'label' => 'LBL_ASSIGNED_TO_NAME',
              ),
              1 => 
              array (
                'name' => 'porcentagem',
                'label' => 'LBL_PORCENTAGEM',
              ),
            ),
          ),
        ),
        ),
      ),
    );

  4. #4
    matthew's Avatar
    matthew is offline Sugar Team Member
    Join Date
    Jul 2005
    Posts
    533

    Default Re: HOW TO build Quick Create subpanel in custom module

    Do you have developer mode turned on? Admin >> System Settings >> Tick Developer Mode.

    Sugar University for training
    Sugar Wiki for developer and user help
    SugarForge for modules, themes, lang packs
    SugarExchange for production-ready extensions
    Enter/view bugs via the Sugar bug tracker

  5. #5
    kinshibuya's Avatar
    kinshibuya is offline A Sugar Hero
    Join Date
    Jul 2008
    Location
    brasil
    Posts
    521

    Default Re: HOW TO build Quick Create subpanel in custom module

    yes. it was already on, is there any other changes i should make?

  6. #6
    kinshibuya's Avatar
    kinshibuya is offline A Sugar Hero
    Join Date
    Jul 2008
    Location
    brasil
    Posts
    521

    Red face Re: HOW TO build Quick Create subpanel in custom module

    Hi it was solved!

    I added wanted to make a quick create on a custom module's subpanel in Opportunities.
    my custom module name is COT_Cotas
    I created the relationship in studio, changed the following on the file /custom/Extension/modules/Opportunities/Ext/Layoutdefs/customopportunities_cot_cotas.php

    Code:
    $layout_defs["Opportunities"]["subpanel_setup"]["cot_cotas"] = array ( // Studio create: opportunities_cot_cotas, it must be changed just to cot_cotas
      'order' => 100,
      'module' => 'COT_Cotas',
      'subpanel_name' => 'default',
      'sort_order' => 'asc',
      'sort_by' => 'id',
      'title_key' => 'LBL_OPPORTUNITIES_COT_COTAS_FROM_COT_COTAS_TITLE',
      'get_subpanel_data' => 'opportunities_cot_cotas',
      'top_buttons' =>
      array (
        0 =>
        array (
          'widget_class' => 'SubPanelTopButtonQuickCreate', //Add the Quick Create
    and that's it!
    Priscila Kin Yamamoto Joranhezon
    Phone: +55 61 32010000
    priscila.joranhezon@nct.com.br
    NCT Informática Ltda

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Passing data to subpanel quick create
    By eggsurplus in forum Developer Help
    Replies: 12
    Last Post: 2010-05-13, 02:15 AM
  2. Open quick create in subpanel by default
    By dkelly in forum Developer Help
    Replies: 1
    Last Post: 2010-05-11, 04:07 AM
  3. Disabling Quick Create in the Case Subpanel.
    By Danielg42 in forum Developer Help
    Replies: 12
    Last Post: 2009-10-09, 09:16 AM
  4. Replies: 0
    Last Post: 2007-06-08, 12:10 PM
  5. Replies: 0
    Last Post: 2007-05-28, 10:36 AM

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
  •