AnsweredAssumed Answered

How can i refresh a specific subpanel in the Detailview

Question asked by Asaf Army on Jan 29, 2018
Latest reply on Dec 5, 2018 by Robert Sinclair

Hello Developers,


I'm using SugarCRM Community edition 6.5.13 version.


When i use the quickcreate of a certain subpanel, i want other subpanel to be refreshed. how can i do that?


For example: in the Accounts Detailview, when creating a new Opportunity, using the Opportunity QuickCreate view, inside the Opportunity subpanel and pushing "Save" i want the Contacts Subpanel (that also under the Account detailview) to be refreshed (never mind the reason).


i know how to refresh the entire sceen after creating a record in a subpanel, but need to refresh a specific subpanel instead because the refresh of the whole screen, takes a lot of time.


i refresh the whole screen by putting a controller.php file in the Accounts module and calls the refresh like this:


class AccountsController extends SugarController {

function action_SubPanelViewer() {

require_once 'include/SubPanel/SubPanelViewer.php';

// only if this is creation of new sale under accounts, refresh the screen so the salerow subpanel will be refreshed too
if ( array_key_exists('module', $_REQUEST) && array_key_exists('subpanel', $_REQUEST) && array_key_exists('action', $_REQUEST) &&
$_REQUEST['module'] == 'Accounts' && $_REQUEST['subpanel'] == "accounts_opportunities_1" && $_REQUEST['action'] == "SubPanelViewer")

echo $js;




How can i refresh a specific subpanel after creating record in other subpanel?


Thank you