Subpanel in Account build on existed Relation

Dear All!
I should add to ACCOUNT a subpanel/module build from an existing relations.
Explaining the situation:

  • In each Opportunity we have as usual the Main Account on the Header
  • We build a SubPanel/Module called “opportunityaccountrole” that list the Accounts that has other roles in the opportunity (influencer, specifier or so on …)
  • Than we have TAB: opportunities_eyd_opportunityaccountrole_1_c that list the relations between Opportunties and Account

I have all table with the “wanted” datas …and I need only to show in ACCOUNT sub panel
OPPORTUNITY - ROLE - and some other data where that Account has a Role!
Opportunity should be “clickable” and link to opportunity

I don’t need to add nothing from “accoun” view …only show the following query

This QUERY that I built exatly shows what I would like to show in the subpanel.

SELECT AS id Account, AS Account Name,
crmidbla_suitecrm.eyd_opportunityaccountrole.role AS role in Opportunity, AS Opportunity Name,
crmidbla_suitecrm.opportunities.number AS Opportunity Id
RIGHT JOIN crmidbla_suitecrm.opportunities_eyd_opportunityaccountrole_1_c
ON = crmidbla_suitecrm.opportunities_eyd_opportunityaccountrole_1_c.opportunities_eyd_opportunityaccountrole_1opportunities_ida
RIGHT JOIN crmidbla_suitecrm.eyd_opportunityaccountrole
ON crmidbla_suitecrm.opportunities_eyd_opportunityaccountrole_1_c.opportunit28e3untrole_idb =
RIGHT JOIN crmidbla_suitecrm.accounts
ON = crmidbla_suitecrm.eyd_opportunityaccountrole.account_id_c

Can u suggest a solution?

Please take a look into this sample:

Just be aware that the system adds some standard joins based on the module you are calling from and it might break your query. If that happens you might try to convert JOINS to SELECT statements.


It looks fits my needs! I will work on it!