How to show meetings in every Invitee related Accounts Subpanel

Hi everyone,

We would like to implement that all meetings are also displayed in the subpanel of the accounts that are behind a participant. In the Meetings module, multiple participants can be added to a meeting. However, the meeting should not only be shown in the subpanel of the contact person, but also in the account connected to the contact person.

Do you have any experience reports on how this can be implemented?

Kind regards

Martin Neitzke
AVM GmbH

Parents
  • Hey everyone,

    I think that this could be solved by creating a custom subpanel - I assume (but I admit I'm not 100% sure) that those can be displayed in the mobile app as well. All the customizations are done in the link class, and from the clients (i.e. mobile app) perspective, this is a subpanel like any other, so it shouldn't have any problem displaying it. In any case, this should be very simple to verify.

    This article is fairly old, but I have a gut feeling that things haven't changed much in this area, so it should still work, and I have used that technique before. You can also look at subclasses of Link2 for inspiration.

    You then have two options: either display the "grandchildren" meetings in a separate subpanel and have two subpanels, or (which is probably preferable) construct the query to include both meetings related directly to the Account and the "grandchildren" meetings.

    However, just so you know, there is (and apparently always has been) a fairly tricky bug in SugarQuery that breaks its ability to do "n-deep" joins, which you will be needing here - see this comment for an example, which dates back to 2016. I encountered the bug when building QuickQuery and managed to find a way to work around it, but it's not easy to do.

    For your purposes, I think you'll be better off if you either a) build a raw SQL join (although not sure if that's permitted in sugar-hosted instances), or b) use the less efficient method of creating a separate SugarQuery that loads all contacts related to the accounts, get their IDs, and then create a join on invitees where the contacts are IN the ids you fetched (I hope I'm being clear enough in the way I'm describing this).

    Kind regards,

    Gabriel

Reply
  • Hey everyone,

    I think that this could be solved by creating a custom subpanel - I assume (but I admit I'm not 100% sure) that those can be displayed in the mobile app as well. All the customizations are done in the link class, and from the clients (i.e. mobile app) perspective, this is a subpanel like any other, so it shouldn't have any problem displaying it. In any case, this should be very simple to verify.

    This article is fairly old, but I have a gut feeling that things haven't changed much in this area, so it should still work, and I have used that technique before. You can also look at subclasses of Link2 for inspiration.

    You then have two options: either display the "grandchildren" meetings in a separate subpanel and have two subpanels, or (which is probably preferable) construct the query to include both meetings related directly to the Account and the "grandchildren" meetings.

    However, just so you know, there is (and apparently always has been) a fairly tricky bug in SugarQuery that breaks its ability to do "n-deep" joins, which you will be needing here - see this comment for an example, which dates back to 2016. I encountered the bug when building QuickQuery and managed to find a way to work around it, but it's not easy to do.

    For your purposes, I think you'll be better off if you either a) build a raw SQL join (although not sure if that's permitted in sugar-hosted instances), or b) use the less efficient method of creating a separate SugarQuery that loads all contacts related to the accounts, get their IDs, and then create a join on invitees where the contacts are IN the ids you fetched (I hope I'm being clear enough in the way I'm describing this).

    Kind regards,

    Gabriel

Children
No Data