CoreBOSBB
Many to may relation with Activities/todo - Printable Version

+- CoreBOSBB (https://discussions.corebos.org)
+-- Forum: Support (https://discussions.corebos.org/forumdisplay.php?fid=17)
+--- Forum: Modules/Extension Support (https://discussions.corebos.org/forumdisplay.php?fid=9)
+--- Thread: Many to may relation with Activities/todo (/showthread.php?tid=2281)



Many to may relation with Activities/todo - radu - 02-24-2022

Hello,
I need some help. I want to relate the module Project to the ToDo's(Activities) in a many to many relation. If i just add the todo module to the related lists in Project's Layout, the table is empty and no buttons to add anything. I found this in wiki related to this issue:
" Activities is done like this:

setRelatedList(relatedmodule, header, actions, 'get_activities')"

But i don't know how exactly to do it. If I do a php with that
setRelatedList(Project, header, actions, 'get_activities')
it just throws
Fatal error: Uncaught Error: Call to undefined function setRelatedList()

Any help is appreciated.

Thanks


RE: Many to may relation with Activities/todo - xh.shazivari - 02-24-2022

(02-24-2022, 08:56 AM)radu Wrote: Hello,
I need some help. I want to relate the module Project to the ToDo's(Activities) in a many to many relation. If i just add the todo module to the related lists in Project's Layout, the table is empty and no buttons to add anything. I found this in wiki related to this issue:
" Activities is done like this:

setRelatedList(relatedmodule, header, actions, 'get_activities')"

But i don't know how exactly to do it. If I do a php with that
setRelatedList(Project, header, actions, 'get_activities')
it just throws
Fatal error: Uncaught Error: Call to undefined function setRelatedList()

Any help is appreciated.

Thanks

Hello,
Try to do some changes directly in database in vtiger_relatedlists table:

Edit the record which has tabid = (Project id) and related_tabid = (ToDos id) . 
You can find the modules' id in vtiger_entityname table.

1. Change name from get_activities to get_related_list
2. Change action from ADD to ADD,SELECT
3. Change relation from 1:N to N:N


RE: Many to may relation with Activities/todo - radu - 03-24-2022

Thank you for the answer and sorry for the delay.
I solved the problem following your advice, much appreciated

Case closed Wink