Using the after_ui_frame logic hook to add a custom subpanel

sugarcrmdevelopers —  February 6, 2013 — 1 Comment

We had a post here a while back on the interesting use of the after_ui_frame logic hook, as it’s the only logic hook designed output HTML to the user. Here’s another case where it can be useful; building out a custom subpanel. See the question below…

I’m currently doing some development work in sugarcrm and I’m struggling with custom subpanels. For what I understand a subpanel can only be populated with data from another module. Now the problem is that I would like to retrieve data from a webservice and display that data using a subpanel.

for instance when I open a account for viewing I would like to display a subpanel which lists all invoices which are retrieved from a 3th party application. Can someone point me to the correct documentation on how accomplish this?

While you could try to fight with the subpanel code to make it fit in somehow, you could instead build the display logic in the after_ui_frame logic hook that mimics the look of a subpanel. Here’s skeleton of what such a hook would look like…

Fill in the HTML block with the content you wish to show. For a more complete example, check out the InsideView after_ui_frame logic hook which emulates much of the subpanel look and feel.

One response to Using the after_ui_frame logic hook to add a custom subpanel

  1. 

    if ($GLOBALS[‘action’] != ‘detail’ || $GLOBALS[‘action’] != ‘DetailView’)

    Will always be false…

    if($GLOBALS[‘action’] = ‘detail’ || $GLOBALS[‘action’] = ‘DetailView’) // NO !
    {
    //Your echo goes here
    }
    return ”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s