I am using SuiteCRM version 8.9.2 on a webserver. I have a custom module called “Subscriptions” that was working fine, with a One-to-One relationship with the Cases module(Subscriptions is Primary module). I wanted to change this relationship to Many-to-Many but, as soon as I did, the records of the Subscrioptions module no longer show up. I can still find individual records through their related Cases, in which case the record shows fine and complete, so the data is fine, just not visible in the List View.
I tried running a Quick Repair, which offered a script to execute. I executed the script via the button that shows up, I got the message that vardefs and DB tables match, but the problem persists.
Also I want to add that after all this I still wanted to make one more relationship change, with the Products module, from One-to-Many to Many-to-Many, which I also did thinking the problem isn’t gonna get much worse and the fix will probably apply to both relationships, so take this into consideration too if needed.
Any ideas on how to tackle this? Any help is appreciated!
EDIT: Added some screenshots to help. The first one is the Subscriptions module showing as empty.
I don’t know what’s going on, and it is possibly a bug, but my suggested approach is to avoid the “change relationship type” move. It’s probably not that tested for all cases, and some of these things are complex (like adding subpanels in all appropriate modules when you create a relationship.
So I suggest an approach where you delete the current relationship and create a new one, using the correct type in the initial moment.
Be careful if you already have data, and established relationships between records, to ensure you don’t lose that when you make these changes. You might need to export and carefully import, or to do some database-level work.
I have been hacking at this for a bit and can’t locate the issue. I even deleted the relationships entirely, along with the link tables since the data was minimal, looked around in the vardefs files etc.
The module works perfectly everywhere inside the CRM, except its own tab. Even the dashlet can find all the records available. The only thing I can think of as a “solution” would be to extract the data and recreate the module from scratch. The only issue with that is I don’t know how to extract from outside the module view.
Have you looked at the fields set-up in Subscriptions, 1 one →many has several fields a relationship and a link field as well, if one of more of the original fields are there it could be erroring. This would also not necessarily go if you deployed the module from the module builder with the relationship in place.
Some of the relationship functionality in the filesystem is actually created at deploy time (ie when you push from module builder to the live system) so just removing the relationship from studio may not catch all of that (there are several instances of the same file in the custom folder for the relationships module AND the metadata/fields vardefs etc. its all a bit odd but will likely leave a fragment that is causing an error in SQL somewhere (check your logs and raise the error level).
I already went ahead and deleted the module, seems like the path of least resistance. My only question now is about a folders_subscriptions table that the CRM wants to recreate when I run Quick Repair. Anyone know what it is, if it’s needed and, if not, where should I look to delete it so that I don’t get the script pop-up during repairs.