HOW TO build Quick Create subpanel in custom module
I need to quick create in subpanel how to do that?
HOW TO build Quick Create subpanel in custom module
I need to quick create in subpanel how to do that?
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
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', ), ), ), ), ), ), );
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
yes. it was already on, is there any other changes i should make?
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
and that's it!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
Priscila Kin Yamamoto Joranhezon
Phone: +55 61 32010000
priscila.joranhezon@nct.com.br
NCT Informática Ltda
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks