I have set up a one-many relationship with the parent as Opportunities and the child a custom module
To do this I followed the instructions in :
http://www.sugarcrm.com/wiki/index.p...s_in_Sugar_5.0
It is almost working properly but I have 2 problems
1) When I go to the parent module the only way to get it to work was to add a deleted field to zz_jobdetail_cstm (zz_jobdetail being my custom module)
I had changed
Which I thought would fix this issue but didn'tin the getQuery() method in data/Link.php change the following lines (two occurences - around lines 372 and 417):
//added deleted clause.
$where.=$this->_add_deleted_clause($deleted,'AND',$this->_relationship->rhs_table);
to:
//add deleted clause - but not if we're dealing with a Custom table which will lack the 'deleted' field
if(substr_count($this->_relationship->rhs_table, '_cstm') == 0){
$where.=$this->_add_deleted_clause($deleted,'AND',$this->_relationship->rhs_table);
}
2nd problem
In the custom module in the list view I can't delete items
If I click on the record concerned I can delete it in the detail view
This is something to do with the changes I've made to crate the one to many relationship as before creating that deletion worked
Any help would be much appreciated


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks