I hope all of you are doing well. I have created 1:1 relationship between custom modules and Custom related modules. 1:1 relationship are working fine and relationship view also perfect. But I want to update related module. If i add new modules in 1:1 relationship add successfully but previous module not deleted /removed.
Asked
Active
Viewed 154 times
1 Answers
1
Modify the values of MODULE,RELMODULE and LABEL and run this script.
<?php
/*
destroy_relation.php
Create this file into your root directory of vtiger i.e. vtigercrm/
and then run this file directly using your browser
for example localhost/vtigercrm/destroy_relation.php
*/
include_once('vtlib/Vtiger/Menu.php');
include_once('vtlib/Vtiger/Module.php');
// Turn on debugging level
$Vtiger_Utils_Log = true;
$moduleInstance = Vtiger_Module::getInstance('MODULE');
$accountsModule = Vtiger_Module::getInstance('RELMODULE');
$relationLabel = 'LABEL';
$moduleInstance->unsetRelatedList(
$accountsModule, $relationLabel
);
echo "done";
?>

psauleda
- 60
- 5