I am trying to create subpanel with data taken from Stored procedure. The query looks like:
EXEC MyTestProcedure @ID = N'c664c324-8278-25da-f02c-51e9af04bb72'
Tried to use custom function to build the query. Fails because it tries to count the rows and apply filters and sorting.
Tried to make custom relation with Overriding Link2 class. Still no luck.
Is there a way to fill custom subpanel with custom data from the stored procedure?
5 April 2021 14:01
Here is an example with direct SQL in a subpanel
Let me try giving you a copy of a different example. My advice is to first try to get my example working as it is, without changing anything; only after it’s working you try and adapt it to your requirement, ok?
Create this file
with these contents:
$layout_defs["Accounts"]["subpanel_setup"]['leads'] = array(
'order' => 80,
'module' => 'Leads',
'sort_order' => 'asc',
'sort_by' => 'first_name, last_name',
I had similar approach. It worked perfectly well with SELECT. I call Stored Procedure (
EXEC MyTestProcedure ) @ID = N’c664c324-8278-25da-f02c-51e9af04bb72’
And the problem here is that after that query SuiteCRM tries to apply filtering and sorting, count the rows. Which is not applicable to Stored Procedure call.
5 April 2021 17:05
But doesn’t your stored Procedure return a list of rows? Or isn’t it the expected format for that module?
I guess you can’t make it a SuiteCRM subpanel if your data doesn’t fit the necessary conditions…