I'm using SugarCRM Professional edition 6.5.8. I'm trying to create a relationship between Cases module and Email module. But it throws following exception
Error Loading relationship ( emails_cases_rel )
The following is the code which i used to create relationship between Cases module and Email Module.
$set_relationship_parameters = array( //session id 'session' => $session_id, //The name of the module. 'module_name' => 'Emails', //The ID of the email module bean 'module_id' => '85e79b92-5025-827f-0784-50aa578270e6', //The relationship name of the linked field from which to relate records. 'link_field_name' => 'emails_cases_rel', //The list of record ids of cases module 'related_ids' => array( '52b8799e-64ae-9502-588c-50aa575454c8', ), //Sets the value for relationship based fields 'name_value_list' => array( ), //Whether or not to delete the relationship. 0:create, 1:delete 'delete'=> 0, );
I think, there exceptions occurred because the email module relationship table structure is different then other modules.
The following is the structure of the email relationship table.
Table Name: emails_beans
Columns are following:
email id :
bean id :
bean module :
campaign data :
date modified :
Any help would be greatly appreciated. Thanks in Advance