- VS Code
- Microsoft Dynamics NAV / Business Central
- Understanding of Control AddIn
Books & References:
Demonstration:In this demonstration, I will be creating or copying a game from a few sample games available on Github or Codepen.io and then showing how these codes can be simplified to make it compatible with Microsoft Dynamics Business Central.
|Main HTML File|
|Adding Stylesheet.CSS to HTML file|
You can refer to
|Ball & brick game running in Web Browser|
This means that whenever you create a ControlAddIn in Business Central, it corresponds to the #controlAddIn element. Thus, instead of <body> being your parent, <div id="controlAddIn"> is your parent tag. Thus, eliminating HTML completely.
In the code https://github.com/olisterr/ControlAddIn/blob/master/ControlAddInSizeDemo-master/ControlAddIn/BallBrick/Startup.js
3. Creation of Control Add-in:
Moreover, we can also define the size of the Control Add-in section on the page.
|Control Add-in in Business Central|
4. Adding Control Addin to Page:
Control Add-in in Business Central is called in a Page with the help of a User Control type on the page.
Here User Control generally behaves like a part page. This means that if you want to make use of any functions or properties of User Control, you need to use
|Page having Control add-in embedded in Business Central|
Events are considered as triggers if the Control Add-in of the Business Central. For Business Central to react to the trigger we need to create a trigger for the User Control.
|Trigger inside Business Central with Text Argument|
Just a request, if you are creating a game on your own I would like to have a copy so I can keep a central repo for games in my Github.
Hope you guys like this :)