Editor’s Note: This post came from Sugar Community member Francesca Shiekh. Thanks Francesca!
In a previous post I shared a function that will find the relationship name for two modules. (
As I was importing some salesforce records into an existing implementation of SugarCRM I found myself needing to relate beans again and again.
So I created a function to link two beans. Given two beans, it looks up the relationship between them, if one is found then it links the two beans:
Hope this can be of use to others. Or if there is a better way to handle this let me know ;-)