Posts: 855
Threads: 238
Joined: Nov 2015
Reputation:
96
I never noticed this, but I'm getting a complaint about it. When creating a purchase order from a salesorder's related list (for example), the salesorder appears in the new purchase order's related list, but not the other way around. Is there any way I can fix this?
Posts: 3,565
Threads: 36
Joined: Apr 2014
Reputation:
49
Those two modules are not related in a standard coreBOS so the question is: How did you relate them? get_dependent_list, get_related_list, other...?
Joe
TSolucio
Posts: 855
Threads: 238
Joined: Nov 2015
Reputation:
96
I related them some time ago, but honestly I don't remember which method I used (I didn't know there were multiple). It may even be that I created a row in the database for the relation. What's the difference between the two methods?
Posts: 855
Threads: 238
Joined: Nov 2015
Reputation:
96
08-03-2017, 08:51 AM
(This post was last modified: 08-03-2017, 09:00 AM by Guido1982.)
OK, I figured out what the difference between get_related_list and get_dependents_list is. I've created a UI10 field in PurchaseOrders and setup a get_dependents_list entry. But I'd like to add BOTH related types to salesorders. So a related list that shows but the related through a UI10 field, and the related through the vtiger_crmentityrel table. Is that even possible?
Also, the problem I have when setting up a relation through get_related_list is creating a new record in this way does not setup a row in vtiger_crmentityrel.
Posts: 3,565
Threads: 36
Joined: Apr 2014
Reputation:
49
To show both relations in one list you will have to create a custom function. Basically, add a new get_related_records() method that does a UNION of get_dependents and get_related queries.
Joe
TSolucio
Posts: 3,565
Threads: 36
Joined: Apr 2014
Reputation:
49
Interesting, I hadn't thought of that as a base code functionality, but it makes a lot of sense. Yes, I would accept a PR for that.
Yes, they all receive the same parameters.
Joe
TSolucio
Posts: 855
Threads: 238
Joined: Nov 2015
Reputation:
96
08-04-2017, 01:54 PM
(This post was last modified: 08-04-2017, 01:54 PM by Guido1982.)
Sadly, as discussed on Gitter this proves to be a lot more difficult than I initially thought. Hope for better days but for now I've given up on it.