If you using Module Builder to create new modules, and having problems making the Subpanel auto-add the new entry in the Subpanel list,
or in simple terms:
1. "Create" from subpanel
2. "Save"
3. No entry in subpanel list (demmit!)
4. "Select" (very inconvenient)
5. Click on the name of the new entry
6. Entry appears in subpanel list
Then the fix is right below, following my example:
Parent module: Tickets
Subpanel module: StrategyTask
in modules/StrategyTask/Save.php, add the coloured line:
$sugarbean = populateFromPost('', $sugarbean);
$sugarbean->tickets_id=$_POST[return_id]; //
tickets is the object name of the parent module
in modules/StrategyTask/StrategyTask.php, add the coloured line:
//BUILDER:START of relationship fields
'tickets_id'=>'tickets', //
tickets is the object name of the parent module
//BUILDER:END of relationship fields
Now you can:
1. "Create" from subpanel
2. "Save"
3. Entry appears in subpanel list! (YAY!)
It works for me perfectly, like the original SugarCRM modules.
I hope this works for all of you, it took a portion of my brain cells and 3 whole days going thorugh the crazy arrays. 
Goodluck!
I am currently using:
-----------------------------
Operating system type and version: Windows XP SP2
Sugar Suite version: 4.2.0d
Module Builder version: 3.1
Simple Template version: 3.1
Webserver type and version: Apache 2.0.54
PHP version: 5.0.4
MySQL server version: 4.1.13a
Bookmarks