Page 1 of 1

CRM Dashboard Behaviour

PostPosted: Tue Oct 10, 2017 1:07 pm
by SBarnes
In the CRM Dashboard that has been done as a plugin if you click on IndicatorPanelSalesOrdersWithBackorders it launches another screen and displays the back orders in another screen.

I need to perform similar logic from another plugin but can't seem to work out what code in the plugin is making this happen.

What actual code is doing this?

Re: CRM Dashboard Behaviour  Topic is solved

PostPosted: Tue Oct 10, 2017 7:53 pm
by Mike.Sheen
Hi Stuart,

In the code behind in the plugin defining the indicator panel, you'll see this line:

Code: Select all
IndicatorPanelSalesOrdersWithBackorders.StoredProcName = "usp_JIWA_Dashboard_Indicator_CRM_MySalesOrdersWithBackorders"


That stored procedure is called when the dashboard is read to display the panel data - but the results from that stored procedure also includes a stored procedure name to use when the panel is clicked (usp_JIWA_NavigationList_MySalesOrdersWithBackOrders).

The indicator panel control we use will, on click, create a new instance of a NavigationList type form, and we set the stored procedure that NavigationList form to use the usp_JIWA_NavigationList_MySalesOrdersWithBackOrders stored procedure - that stored procedure returns two result sets - one defining the column schema, and another the data. The NavigationList form will call a method of the JiwaGrid control to build it's grid based on the 2 result sets of that stored procedure.

Just like magic!

The sample plugin Simple Performance Metrics also uses a NavigationList type form which can be loaded from a menu to automagically load a form with a single grid populated from a stored procedure - in case you don't want or need to use an indicator panel, but just simply want to load a form.

You can also control the background colour used per cell - take a look at the stored procedure usp_JIWA_NavigationList_MyCustomers to see how we did that (also used by the CRM dashboard to make sales figures RED or GREEN based on a comparative to the budget figure).

Mike

Re: CRM Dashboard Behaviour

PostPosted: Tue Oct 10, 2017 8:22 pm
by SBarnes
Thanks Mike,

I'll take a look at the other plugin, I am assuming from what I know that the Inventory screen does similar things (stored procedures and Jiwa Grid) for back orders, unprocessed orders etc so those stored procs are done in a similar fashion?

Re: CRM Dashboard Behaviour

PostPosted: Tue Oct 10, 2017 8:29 pm
by Mike.Sheen
SBarnes wrote:Thanks Mike,

I'll take a look at the other plugin, I am assuming from what I know that the Inventory screen does similar things (stored procedures and Jiwa Grid) for back orders, unprocessed orders etc so those stored procs are done in a similar fashion?


Some, not all - some still use our old way of invoking a stored procedure which returns an XML definition for the grid (YUCK!) our new way is much, much neater.

Mike

Re: CRM Dashboard Behaviour

PostPosted: Tue Oct 10, 2017 8:56 pm
by Mike.Sheen
Oh, and if you're wanting to display different information in the inventory maintenance form for some of those grids you mentioned (back orders, unprocessed orders etc) you can easily add a new tab to call your own stored procedure using our new method via the Custom Form Tabs configuration under the system maintenance menu - and then just hide the existing tab (or keep it there - your choice).

Re: CRM Dashboard Behaviour

PostPosted: Wed Oct 11, 2017 10:31 am
by SBarnes
Sweet

Is there a document besides the multiple release notes that lists whats added since 7.00.175 as I notice a few other things such as timesheets?

Re: CRM Dashboard Behaviour

PostPosted: Wed Oct 11, 2017 7:02 pm
by Mike.Sheen
SBarnes wrote:Sweet

Is there a document besides the multiple release notes that lists whats added since 7.00.175 as I notice a few other things such as timesheets?


Hi Stuart,

Timesheets for Service Manager were introduced in 7.00.143 (DEV-4211 - so they appear in the 7.00.149 release notes (the next public release after implemented in the dev build 7.00.143).

The release notes we provide for 7.01 should provide everything we've introduced since 7.00.175.

The Custom Form tabs I mentioned earlier is not new either - been there for a while - so that also does not appear in the 7.01 release notes.

Mike

Re: CRM Dashboard Behaviour

PostPosted: Wed Oct 11, 2017 7:11 pm
by SBarnes
Thanks

Are most of the grids(at least the read only ones) in the User Interface going to move to this new stored procedure approach?

Re: CRM Dashboard Behaviour

PostPosted: Wed Oct 11, 2017 7:16 pm
by Mike.Sheen
SBarnes wrote:Thanks

Are most of the grids(at least the read only ones) in the User Interface going to move to this new stored procedure approach?


Most definitely.

We've not done gone back yet and updated them to use the new (new as in newer than the old XML approach, but not new in 7.1) approach - when we have an idle moment (hah!) or when we need to modify something within the existing ones we'll go back and update them to use our now preferred method.

Mike

Re: CRM Dashboard Behaviour

PostPosted: Thu Oct 12, 2017 7:20 pm
by SBarnes
Hi Mike

Well now that you've gotten 7.1 out the door no doubt there's all that spare time you've got :lol:

If I could politely suggest an enhancement to the idea, which I think is good in that it makes things highly customisable for the client would there be a way to include the ability to call plugin code similar to the hyperlink that can be called when the grid is clicked, I have no idea if this is even possible, but I thought it would certainly open up a great number of possibilities from the point of customisation.