I have a module that’s a bit top heavy at the moment, I want to only show part of it on the main tab and when the user clicks on another tab (at the top) for the system to load the rest of the data
But right now I think all the data from all the tabs is loaded right away so it doesn’t help.
Can someone recommend a way to only load data from another tab when we click it? Or suggest another approach?
There’s nothing built-in to achieve this, but of course it can be done with some custom coding.
If you inject Javascript into the view you can use the normal AJAX approach to get just the data you need in response to user actions.
But maybe a better approach is to try and design the data and the screens better to avoid the need for so much data in the first place. What exactly do you think is delaying you? Is it too many images that take a while to download? Or is it too many queries that delay the server response?
Thank you, yes it’s basically a lot of querying since there’s a lot of subpanels being loaded and a lot of computing happening.
I’m thinking of adding a link to the “action” links and then displaying a custom view to avoid messing with JS too much, unless you can recommend something else?
Try leaving subpanels collapsed, I think (not 100% sure, though) that this actually avoided the queries getting run.
Also check if your subpanel queries have the appropriate database indexes, and if the tables aren’t overgrown. Meaning: database maintenance makes your SuiteCRM run faster, and SuiteCRM does require some database maintenance to purge old stuff occasionally.
You’re right, I just tested it and sub panels which are not expended do not load the data right away… This is actually huge for my design, glad I checked this thread