Duplicate Relationships and Subpanels in Cases

Dear SugarClub Members, 

We have a number of duplicate relationships in the Cases module. These relationships may have been created in Studio but are now not able to be removed from Studio. 

With the duplicate relationships, it has also created duplicate Subpanels in the Cases Record view. 

I have contacted Sugar Support regarding this issue, and they have advised me that it is related to the Bug #90534.

https://portal.sugarondemand.com/#supp_Bugs/90534

The workaround that they have provided was to remove the relationships by removing a number of the custom php files that related to the relationships. While this did remove the subpanels, it also prevented any new related records being added to cases. i.e. producing a "HTTP: 500 Internal Server Error" in the browser and "[4319][38ce6546-76a5-11e9-929b-d27c7d704edb][ERROR] Unable to find relationship cases_activities_1_calls" in the error log. 

Sugar support has advised me to wait for a fix to the bug or to reach-out to the Sugar Community to see if anyone else has experienced this issue. 

I would be happy with just finding a way to hide the Subpanels on the Cases Record view, that would be a win for me. 

Thanks to anyone who might have a solution or experienced the same issue. 

Regards

Peter

  • Duplicated relationships for all activity types are coming once you create a relationship to "activities" (for having the activity stream which uses all types of activities) and you have set them up manually before.

    Bests

    Björn

  • Hi Peter,

    If you want to delete the relationships through code you have to be extremely cautious and know what and all files needs to be deleted to delete a relationship subpanel. If you are experiencing the issue to delete the files and If you want to just hide the subpanels from the layout you can do that by following this link

    Note: Please make sure you pass the correct subpanel link name in the code and it should perfectly work for you.

    Hope this information helps you:)

    Thanks and Regards,

    PK,

    Senior Solution Engineer.

    www.bhea.com

  • Hi Peter,

    Based on the error you are receiving, it seems that there are some artifact files for the cases_activities_1 relationships still present in your ./custom directory. These files would likely be under one of the following directories:

    • ./custom/metadata
    • ./custom/Extension/application/Ext/TableDictionary
    • ./custom/Extension/modules/Cases/Ext/Vardefs
    • ./custom/Extension/modules/<activity_module>/Ext/Vardefs (where activity_module is either Calls, Meetings, Emails, Notes, and/or Tasks)

    If there are any files in those directories that contain the string 'cases_activities_1' then I recommend the following steps:

    1. Ensure the file only contains references to the cases_activities_1_<module name> relationship(s) and no other relationship definitions
    2. Assuming the file only references the bad relationship, then remove the file.
      1. If it contains additional references to other relationships, you may need to selectively remove contents of the file. This would only need to be done if these relationships were created manually by a developer. If the relationship was created via Studio and never touched by a developer, then removing the files outright should be fine.
    3. Perform a quick repair and rebuild from the Admin > Repair menu

    Chris