Resident control add-ins – no SingleInstance

  • Post comments:0 Comments

My last topic was resident control add-ins. In my video and written blog I’ve explained what they are and how you can quickly have them up and running. However, there was one particular thing I said I generally don’t like – single-instance codeunits. So my second blog on this topic focuses precisely on that: how to make your control add-in available to your AL code from everywhere, without having to rely on a single-instance codeunit.

(more…)

Continue Reading Resident control add-ins – no SingleInstance

Resident control add-ins

  • Post comments:1 Comment

One of the most common questions I get asked about Control Add-ins is whether you can make a control add-in be always present and able to respond to your calls from AL. In other words: can you have a resident control add-in that you can invoke from anywhere in your AL code.

I’ve done a lot about control add-ins. However, I’ve never done resident control add-ins for real; all I know about them is pure theory and then some playing I did at various points of time. Still, this is an interesting topic that I wanted to address some way or other.

So, yesterday I did a live session about it.

(more…)

Continue Reading Resident control add-ins

Using Font Awesome icons in control add-ins

  • Post comments:2 Comments

This post has been long overdue. I’ve had it in my to-do list for nearly four years now, but it always ended up in the not today category. Funny how many times I’ve implemented it already, and how many times I’ve presented this, and I never ever found a few minutes to create a demo repository and a blog to come with it. So, here we go.

Including web fonts in your control add-ins is no rocket science, really. Control add-ins are just pieces of HTML, CSS, and JavaScript running in an iframe, so whatever you can do within an iframe from anywhere else, you can do it from control add-ins. Web fonts are no different. The problems start if you want to package web fonts into the control add-in so that you can use them even when your BC/NAV instance is running in an isolated network, or if you simply want to eliminate any external dependencies.

Control add-ins support packaging script, stylesheet, and image files. This could make you think that you cannot include web fonts. But that would be wrong. If you read my blog post about abusing images to load HTML files, then it might give you some ideas. Yes, you can use the same trick to load web fonts or just about any other external resource.

Let’s take a look how to include a web font, and let’s use Font Awesome as an example. Because it’s just awesome.

(more…)

Continue Reading Using Font Awesome icons in control add-ins