Using Studio, I am trying to change the preset relationship between the “Leads” module and the “Opportunities Module”. It is currently One to Many, and I would like a Many to Many. The screen is totally non responsive to my input.
that is a specific development inside the core.
Those types of core developments can’t be changed via the studio.
Without looking into the code in detail, I assume that might be quite a project (since the lead conversion to opportunity might be affected as well).
What you can easily do is, to simply add another relationship via the studio.
The next one can then be your n:m relationship.
However, technically that’s possible. Data architecture wise that sounds a bit odd. Let me know your business case, if you want to. Maybe there is another approach of accomplishing your requirement as well.
Well. I tried adding the “unusual: Many to Many Relationship, and as you suspected, the logical actions expected during the “convert” did not occur, and the the leads relationship linked to itself. Other than that it looked promising.Next step is creating a new module.
You can’t just add stuff to the lead an expect it to follow on conversion. There is a specific file that handles conversion. You have to write a script to copy the relationships over on conversion. This is done by modifying the convertlead.php file. Not sure if SuiteCRM 8 still uses this, but I suspect it does. This works in 7. Just copy the copy to: /modules/Leads/views/view.convertlead.php
Then you can add your new relationship and it will copy on conversion. At least in 7. Haven’t tried in 8.