Hi
It would be really useful to be able to make quick changes to records without navigating away from the record sub-panel.
Same as when you click “Create” button on the sub-panel item, but being able to edit an existing record, so the edit form appears alongside the sub-panel not in another window.
This is particularly helpful when you need to make changes to multiple records within sub-panels on the same page.
This feature is on SugarCRM Professional so I guess why cannot also be on SuiteCRM
If anyone could point me out on how to do it…
Regards
Will
22 October 2013 15:25
2
Hi,
Thanks for your suggestion to add this as a feature in SuiteCRM.
Will.
Hi. I support this. It is a must have honestly.
You dont want to leave the record to edit a call report, or a note.
I managed to make it work.
You can create a custom SugarWidget and paste the following code inside:
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
class SugarWidgetSubPanelQuickEditButton extends SugarWidgetField
{
function displayList($layout_def)
{
global $app_strings;
global $subpanel_item_count;
$return_module = $_REQUEST['module'];
$return_id = $_REQUEST['record'];
$module_name = $layout_def['module'];
$record_id = $layout_def['fields']['ID'];
$subpanel = $layout_def['subpanel_id'];
$unique_id = $layout_def['subpanel_id']."_form_".$subpanel_item_count; //bug 51512
// @see SugarWidgetSubPanelTopButtonQuickCreate::get_subpanel_relationship_name()
$relationship_name = '';
if (!empty($layout_def['linked_field'])) {
$relationship_name = $layout_def['linked_field'];
$bean = BeanFactory::getBean($layout_def['module']);
if (!empty($bean->field_defs[$relationship_name]['relationship'])) {
$relationship_name = $bean->field_defs[$relationship_name]['relationship'];
}
}
$subpanel = $layout_def['subpanel_id'];
if (isset($layout_def['linked_field_set']) && !empty($layout_def['linked_field_set'])) {
$linked_field= $layout_def['linked_field_set'] ;
} else {
$linked_field = $layout_def['linked_field'];
}
$html = '
<form onsubmit="return SUGAR.subpanelUtils.sendAndRetrieve(this.id, \'subpanel_'.$subpanel.'\', \'Loading ...\');" action="index.php" method="post" name="form" id="'.$unique_id.'">
<input type="hidden" name="record" value="'.$record_id.'">
<input type="hidden" name="target_module" value="'.$module_name.'">
<input type="hidden" name="tpl" value="QuickCreate.tpl">
<input type="hidden" name="return_module" value="'.$return_module.'">
<input type="hidden" name="return_action" value="SubPanelViewer">
<input type="hidden" name="return_id" value="'.$return_id.'">
<input type="hidden" name="return_relationship" value="'.$relationship_name.'">
<input type="hidden" name="action" value="SubpanelCreates">
<input type="hidden" name="module" value="Home">
<input type="hidden" name="target_action" value="QuickCreate">
<input type="hidden" name="return_name" value="XXXX">
<input type="hidden" name="parent_type" value="'.$return_module.'">
<input type="hidden" name="parent_name" value="XXXX">
<input type="hidden" name="parent_id" value="'.$return_id.'">
<input title="Quick Edit" accesskey="N" class="button" type="submit" name="projects_opportunities_create_button" id="projects_opportunities_create_button" value="Quick Edit">
</form>';
return $html;
}
}
?>
2 Likes