Add image to an action with the power of AI

Story

Did you ever thought how much time developer spend on selecting the right imageto NAV action? In NAV 2017 there were 1049 images, and in NAV2018 we have 1104!

So every time developer add new action, he should select one image from 1104. It could take 5-10 minutes. For some period of time Dynamics NAV Image Library by AJ Kaufmann was a solution for me. Thanks for him once again! And what about the quality of this choice? NAV developers are rarely good in UI design. This could result in good solution with ugly interface.

Idea

On the other hand, we have awesome standard NAV with huge number of high quality standard actions, which were designed by Microsoft.

So all this pushed me to an idea: What if we can take standard NAV, create machine learning model, which will propose image for custom action, and add this possibility to Visual Studio Code as an Extension to AL?

Sounds good!

To solve this simple task (at first sight), we need to:

1) Create training dataset for machine learning

2) Create machine learning model and train it

3) Publish model as a web service

4) Create Azure Function with some code to call ML web service (why AF? See in later blogs)

5) Create Visual Studio Code Extension

6) Create marketing materials and publish on Marketplace

Practically all of this is - out of my comfort zone. But I decided to start the journey. And with the help of different blogs, YouTube videos, and “googling” we have happy end :)

Now there is 1.15 sec pause between call and answer. That is because my Azure ML model has 90,249 % prediction rate, which is very good, but model is complex. May be in another version I will reduce this time.

But agree that 1 second is nothing in compare to manual work!

In later blogs, I will share more detailed information about how I’ve passed every step. But now feel free to use iAL extension in your everyday work (I hope you use AL every day?).