I'm using Sugar 5 and I've created 2 new modules using the module builder.
Is there a way to relate the two modules together? When I go to flex relate or just relate, none of the new modules show up. How can I fix this?
I'm using Sugar 5 and I've created 2 new modules using the module builder.
Is there a way to relate the two modules together? When I go to flex relate or just relate, none of the new modules show up. How can I fix this?
Create flex relate or relate w/, say, Accounts module.
Then after you publish a package, just replace 'Accounts' labels in vardefs, metadata, layoutdefs of installation package w/ labels of your custom module.
Farkhad Rakhimzhanov
E-mail: farkhad@gmail.com
Skype: rakikama
SuperTimesheet and Invoicing — timesheet tool with invoicing for SugarCRM.
Book time against Cases, Project Tasks and Projects.
Create invoice regarding booked time, print it in PDF or HTML,
customize template as you like.
Superman, is it a reported bug then? And that is a work-around for the bug?
What I'd really like to do is to be able to write a piece of code that would add the new modules dynamically to the relate and flex relate drop down options. This way, whenever I add a new module, I could automatically relate it to an existing module regardless if it's a sugar module or custom module.
Lucchase, I don't think it is a bug.
Sacramentojoe, you may push such business logic into post_install script of new custom module. So, when it is being installed dropdown will be updated w/ your additions.
Farkhad Rakhimzhanov
E-mail: farkhad@gmail.com
Skype: rakikama
SuperTimesheet and Invoicing — timesheet tool with invoicing for SugarCRM.
Book time against Cases, Project Tasks and Projects.
Create invoice regarding booked time, print it in PDF or HTML,
customize template as you like.
Superman,
I'm also trying to create a one-to-many relationship between 2 custom modules.
I've tried following your advice to create a relate field with the Accounts module and then modifying the labels in the various files you listed. It didn't work out for me. I'm a bit of a newbie to PHP, so if you could include complete path names (and any other tips), that would be most appreciated. Thanks!
Actually, Module Builder provides only many-to-many relationships.
Therefore, you should go to SugarWiki and find doc on how to create one-to-many relationship
Happy New Year!
Farkhad Rakhimzhanov
E-mail: farkhad@gmail.com
Skype: rakikama
SuperTimesheet and Invoicing — timesheet tool with invoicing for SugarCRM.
Book time against Cases, Project Tasks and Projects.
Create invoice regarding booked time, print it in PDF or HTML,
customize template as you like.
Superman - can you provide a link to the wiki document you mention above? I searched "one-to-many" and didn't get any hits in the wiki! Thanks!Originally Posted by Superman
Rick
1. http://www.sugarcrm.com/wiki/index.php?title=Subpanels
2. http://www.sugarcrm.com/wiki/index.p...nship_Metadata
Also don't hesitate to have a look at http://developers.sugarcrm.com/
Farkhad Rakhimzhanov
E-mail: farkhad@gmail.com
Skype: rakikama
SuperTimesheet and Invoicing — timesheet tool with invoicing for SugarCRM.
Book time against Cases, Project Tasks and Projects.
Create invoice regarding booked time, print it in PDF or HTML,
customize template as you like.
Hi. I am actually taking over the project that sacramentojoe was referring to. I have modified the ModuleBuilder to create a "post_install.php" script on publish/deploy/export and when I deploy a module it seems to be running it, however the code I'm putting into the post_install.php file does not seem to be correct. I need it to do as you said and update the dropdown values with the new module. Here's the current code being generated in post_install.php (I'm basing it off of diving through the code in ModuleBuilder that currently updates a dropdown from studio, but I may have some parameters incorrect or something):
<?php
require_once ('modules/ModuleBuilder/parsers/ParserFactory.php');
$params = array();
$params['action'] = 'savedropdown';
$params['dropdown_lang'] = $GLOBALS['sugar_config']['default_language'];
$params['dropdown_name'] = 'record_type_display';
$params['module'] = 'ModuleBuilder';
$params['view_package'] = 'studio';
$tempModules = $GLOBALS['app_list_strings']['record_type_display'];
$parser = ParserFactory::getParser('dropdown');
$tempModules['test1_TestModuleP2'] = 'test1_TestModuleP2';
$params['list_value'] = $tempModules;
$parser->saveDropDown($params);
?>
Any ideas? I got the $params using firebug to examine a post during the regular dropdown editor save process, so that could be off. What it's doing now is when this runs, it just adds the following to the end of the custom/include/language/en_us.lang.php file:
$app_list_strings['']=array (
);
Any help is much appreciated!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks