So im going nuts here, I might as well tell you the whole thing i did, and maybe you can help me with it.
I am in the on demand version of sugar.
i need to relate 2 custom modules so i used the module builder to create a package for them:
the custom modules are form and map. then i created a relationship between both like this:
After that i deployed my package to my sugar instance and proceeded to create some test data.
then on my custom entry point i wish to get the maps related to a specific form so this is my code:
But when i try to call my entry point It wont return any maps related to the form, here is an example:
in the example the maps arent echoed, i just cant find where the problem is. any help would be appreciated !
I too have had problems with load_relationship. In most cases the problem ist the $rel_map param in your case. There is a Sugar function in modules/Leads/views/view.convertleads.php:
It returns the required Value for load_relationship if given a bean of each module as param. In the code '$def['type'] == "link"' you can see it fetches the link and NOT the relation.
In short: get the linkname for your relation in your d_form module to use in load_relationship not the relationship name