Desperate about subpanels

Hi everybody. After 2 or 3 days searching on the Internet and trying things I though could work, Iā€™ve decided to come here before commiting suicide :S

The thing is that Iā€™m trying to refresh a subpanel after a record is saved in another subpanel. The module where the subpanels belong is Contacts and the subpanels are in the screenshot you can find attached.

Notice that 1 of the 2 subpanels is the complex ā€œActivitiesā€ (at least I think it is so) and the other one is a custom panel I created myself.

Please, Iā€™m really desperate.

Any help is welcome.

There is a function called showSubpanels(). You would call this, and pass in the parameters and details for the sub-panel you wished to refresh, after your button had been clicked.

Do you have good programming knowledge?

Do you know where to edit sub-panels?

Hi Will,

Thanks for your quick reply. About your questions, yes, I studied Computer Science Engineering and Iā€™m a professional for 7 years. Im not sure about the second one, but I think I know where I have to edit the subpanels.

The file below is the one that I have to modify, right?
custom\Extension\modules\Contacts\Ext\Layoutdefs\contacts_tena_reactionaction_1_Contacts.php

Its contents are:


<?php
 // created: 2015-01-12 08:52:01
$layout_defs["Contacts"]["subpanel_setup"]['contacts_tena_reactionaction_1'] = array (
  'order' => 100,
  'module' => 'Tena_ReactionAction',
  'subpanel_name' => 'default',
  //'sort_by' => 'date_act_or_react,parent_type', //JMM 2 lines. No funciona como queremos asĆ­ que se modifica el SugarBean.php para ello.
  //'sort_order' => 'desc,desc',
  'title_key' => 'LBL_CONTACTS_TENA_REACTIONACTION_1_FROM_TENA_REACTIONACTION_TITLE',
  'get_subpanel_data' => 'contacts_tena_reactionaction_1',
  'top_buttons' => array(),
);

I already tried with that function you mentioned but had no success. Could you explain it to me a bit? By the way, I need the subpanel refreshing AFTER the record is saved, not when the save button is clicked because it has to show information from the relationship.

Thank you again!

Chemi

That sounded pretentious, to say the least. Iā€™m sorry. Iā€™m still learning and I have soooo much to learnā€¦
Chemi

Up! Any help? :slight_smile:

Hello Andy,

any help?

Thanks!!!

Up!

Andy? Will? Help on this?

Thanks in advance!

ā€œContactsā€ with ā€œOne to Manyā€ relationship in ā€œCasesā€ . When you refresh ā€œCasesā€ subpanel in ā€œContactsā€ module, You just call this relationship name ā€œcontacts_cases_1ā€ in following Line.

showSubPanel(ā€˜contacts_cases_1ā€™, null, true);