NAV TechDays 2018 Demos: Customer Star Rating

I usually post my NAV TechDays demo stuff for you to use and abuse, and this year won’t be an exception. There are three changes, to previous years, specially the last year. First, you won’t need to wait until New Year’s Eve for me to post my stuff. Second, I’ll blog each of the demos individually, because of the third reason. Third, I don’t want to merely dump my code here with a big fat disclaimer; no – I’ll dump it with a big fat disclaimer and some explanations about what the code does and why.

So, here we go, the first demo (actually the second, because I already posted that Muppet Theme): Customer Star Rating control add-in.

This demo is simple: it adds a factbox to the customer list page, and within that factbox it shows two star scales to rate the customer in two categories. You can select the number of stars you give the customer, and that rating is stored in a new blob field on the customer table. It can’t be any simpler from the surface.

Inside:

  • It applies the Image-As-HTML trick I blogged about yesterday (slightly different approach but minor, irrelevant differences)
  • It applies the ControlReady pattern (I blogged about this one a long time ago), and how it should be done in a Business Central control add-in (by using the StartupScript, I’ll blog more about this)
  • Shows how to implement interface methods declared in the control add-in object definition by exposing them from the encapsulated scope

One minor disclaimer, the demo at TechDays (as you can see in the video at https://www.youtube.com/watch?v=KnUomsA_4Jk) shows the demo in Business Central, and my screenshot here was taken in NAV 2018. Sorry for that, I couldn’t get my Docker container working after restart of my BC VM, so to be able to post this blog this morning, I had to take the screenshot from NAV 2018. Hope you don’t mind.

You can find this demo at GitHub: https://github.com/vjekob/controladdin-starrating

There are two branches:

  • Branch “master”: contains the demo code for Business Central
  • Branch “nav2018”: contains the same, just with the manifest (app.json) for NAV 2018 (minor, negligible differences)

And yes, the big fat disclaimer (which is actually small and thin): I provide this as-is, you are free to use it whatever way you see fit, but you can’t hold me responsible for any damage you cause to the civilization, the universe, and like (NAV and BC instances included).


Read this post at its original location at http://vjeko.com/nav-techdays-2018-demos-customer-star-rating/, or visit the original blog at http://vjeko.com. 5e33c5f6cb90c441bd1f23d5b9eeca34

The post NAV TechDays 2018 Demos: Customer Star Rating appeared first on Vjeko.com.

Comment List
Related
Recommended