Remove SugarCRM Custom Relationship

After searching for a while, I finally found out how to manually delete or remove a sugar crm relationship that was created in studio. I tested this on Sugar 5.2 Professional and it seems to work just fine. Use at your own risk.

When you create a new relationship through Admin -> Studio -> -> Relationships, Sugar create several files at custom folders:

Left Side Hand Relationship (module from which you created the relationship):

custom/Extension/modules/{moduleName}/Ext/Vardefs/{relationshipName}.php
custom/Extension/modules/{moduleName}/Ext/Layoutdefs/{relationshipName}.php
custom/Extension/modules/{moduleName}/Ext/Language/{relationshipName}.php

Right Side Hand Relationship:
custom/Extension/modules/{moduleName}/Ext/Vardefs/{relationshipName}.php
custom/Extension/modules/{moduleName}/Ext/Language/{relationshipName}.php

Relationship itself:
custom/metadata/{relationshipName}Meta.php

Table Dictionary:
custom/Extension/application/Ext/TableDictionary/{relationshipName}.php

Edit custom/application/Ext/TableDictionary/tabledictionary.ext.php file and delete include(‘custom/metadata/{relationshipName}.php’);

To remove the relationship, you need to delete these files. After removing all these files you should need to go to Admin -> Repair -> Quick Repair and Rebuild

Original post:

http://www.sugarcrm.com/forums/showthread.php?t=37781

  1. No comments yet.

  1. No trackbacks yet.