Populate a subpanel with custom query

Hi there !

I'm working on a Cloud 10.3 Enterprise instance.

I tried several things but didn't manage to achieve the result I want ... 

Let me explain to you : 

In a custom module (named Bail_Baux), I have a subpanel displaying the "Lots" entites related to the "Bail" entity.

I want to change the way the data are displayed, they are still linked to the same module, but I need to make a group by query based on several items (type, bail code, etc ...).

I tried the following links, but no way, nothing change in my display of subpanel : 

https://stackoverflow.com/questions/19695473/how-to-modify-data-for-a-sugarcrm-subpanel-using-php

https://www.urdhva-tech.com/blogs/add-custom-subpanel-in-accounts-module

The custom subpanel doesn't appear, nor the content of the existing one changed ... 

Is this modification still available in Sugar 10 ? I see similar things in the code, but didn't perform to add my custom query.

Second thing, is there a way to add group by or whole custom query with this tuto : 

https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/creating-subpanels-with-custom-results-in-sugar-7-5

Thanks in advance and best regards,

Enes

Parents
  • This approach doesn't work since version 7.*. Instead you need to set the attributes relationship_file and relationship_class in the link field of parent module. This way you can define a custom relationship class inside which you are able to modify the SugarQuery object accordingly.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
Reply
  • This approach doesn't work since version 7.*. Instead you need to set the attributes relationship_file and relationship_class in the link field of parent module. This way you can define a custom relationship class inside which you are able to modify the SugarQuery object accordingly.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
Children