How to enhance Business Central Role centers with the power of Widget Containers and jQuery
Using the ControlAddins and power of jQuery it is possible to add container widgets to roles centers to extend their functionality, using the page parts in which to publish the widgets.
Surely, this is interesting for demos as other products do the same thing, giving the idea that Business Central Online is completely customizable using internet services.
To achieve this, it can be done in several ways; in this example, jQuery is used for loading data into widgets.
For example, you could add multiple custom Power BI containers in multiple sections of the role center by sizing them as you want or view production data in real time or read directly from machine centers creating dedicated widget panels etc. etc.
What is jQuery?
The standard Business Manager Role Center
We want to extend the role center by inserting three widgets loaded by Addin through jQuery
The role center is extended by adding the 3 widgets that we declare as page parts
Widget Container example
div for widget
<div class=”tradingview-widget-container row”>
<div class=”tradingview-widget-copyright”><a href=”https://www.tradingview.com/symbols/AAPL/” rel=”noopener” target=”_blank”><span class=”blue-text”>Apple</span></a> by TradingView</div>
StyleSheets = ‘https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css’,// bootstrap
In this case, we can use Bootstrap as a Stylesheet
EXAMPLE: “THE METEO” WIDGET
The AL code can be found at the link below
AT THE END…
After having published the APP we see that the Role Center has been extended and displays the new 3 widgets, obviously others of common interest can be added.
As mentioned, for those who do not already know it, useful for presentations to prospects.
L'articolo How to enhance Business Central Role centers with the power of Widget Containers and jQuery proviene da Roberto Stefanetti Blog.