Extending the HTML trick: using actual images

  • Reading time:3 mins read

Eric Sevareid famously said that the chief cause of problems is solutions. The same applies to the HTML trick I blogged about yesterday. As soon as you solve the problem of using HTML directly in your control add-ins, another problem arises: what do you do with actual images your control add-in includes?

This post explains how to solve that problem, and how to make it possible for your control add-in to both use HTML for defining UI and use relative control add-in paths to images.

Let’s dig in.

Continue ReadingExtending the HTML trick: using actual images

NAV TechDays 2018 Demos: Customer Star Rating

  • Reading time:3 mins read

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.

Continue ReadingNAV TechDays 2018 Demos: Customer Star Rating

Encapsulation in JavaScript

  • Reading time:5 mins read

This will be my last post in the “JavaScript for (C/)AL Developers” series today. If I continued blogging about nearly pure JavaScript stuff, you could reasonably ask if this is in fact an NAV blog or a JavaScript one. It’s still NAV, and while the stuff I am about to write about is purely a JavaScript concept, I find it highly relevant for any control add-in developer. So, hold my beer, and bear with me for another one.

One of the complaints I often hear about JavaScript is that in JavaScript there is no encapsulation. This is almost completely true, except for the fact that it’s entirely false.

Where is the problem in the first place, and then what is the solution? Let’s dive in.

Continue ReadingEncapsulation in JavaScript

Some more thoughts about trampling over $

  • Reading time:1 min read

I am on a spree today. The number of topics I wanted to blog about has accumulated, and I just decided to dump the stuff over here while I both feel the motivation and have time for blogging. However, in this hurry, I forgot to add some important content to my previous post.

First, I forgot to mention that the example of my preserve-jquery script trick can be found in this github repo:

https://github.com/vjekob/controladdin-html

That’s the demo I blogged about earlier today, except this time it has two more branches:

  • Branch “problem”: showcases how a problematic script can break your code.
  • Branch “solution”: showcases how this problem can be fixed by applying the trick from my previous post

Also, there are two JSFiddles I created to follow screenshot-base examples from the post:

I have one more topic to cover today, which has much more to do with JavaScript than control add-ins, but I still find it very relevant. Stay tuned.

Continue ReadingSome more thoughts about trampling over $

Preventing trampling over $

  • Reading time:7 mins read

In my previous post, I’ve written about the situation when you (or somebody you trust) redeclares the $ variable, thus inadvertently breaking all your jQuery code. I’ve also explained how to remedy for it inside the code you write by applying the Immediately Invoked Function Expression (IIFE) or Self-Executing Anonymous Function pattern.

However, is there anything you can do to prevent anyone from trampling over $ or jQuery variables in the first place?

As I said in my last post, yes, and no.

Let’s take a closer look at it.

Continue ReadingPreventing trampling over $

Why doesn’t my jQuery work?

  • Reading time:6 mins read

First, a disclaimer. This post is written for (C/)AL developers who are struggling with JavaScript, who copy and paste JavaScript code from Stack Overflow right into VS Code and are happy when it works, and confused when it doesn’t. Still, if you are not a (C/)AL developer but want to learn a bit of JavaScript yourself, this post is not at al about AL, it’s purely about JavaScript, and about demystifying a piece of it that JavaScript developers take for granted, and that developers with experience only with simpler languages (such as AL) find confusing.

Now let’s jump into the point. A friend asked me for help with a control add-in in which “jQuery doesn’t work, I can do jQuery() but I cannot do $()”

This is one of the schoolbook examples of what happens when you don’t isolate scope in JavaScript, so let’s first see what happened, and then let’s see how you can fix it.

Continue ReadingWhy doesn’t my jQuery work?

Abusing Images property to load HTML in control add-ins

  • Reading time:4 mins read

One of major limitations of control add-ins is not being able to define HTML. It seems so unbelievably unbelievable, that anyone looking at it from the outside of the NAV/BC playground may say “obviously, you must be missing something!”. But I am not. The one thing that you would expect to find first when defining a control add-in (and control add-ins in NAV/BC are nothing more than pieces of HTML that live within the allocated area of your browser real estate) is to be able to define the HTML. And yet, you can’t define it. The only way to show any UI from your control add-in is to procedurally create any of your control add-in HTML.

This makes no sense. No. Sense.

Continue ReadingAbusing Images property to load HTML in control add-ins

By popular demand: The Muppet Show theme

  • Reading time:6 mins read

NAV TechDays keeps getting better and better and better every year. So this year, my bro Waldo and I had to prepare a few special surprises in stock for you. And following all the buzz this has generated on Twitter and in the conference app was just amazing, and now we have to think of what can we do the next year to top this one. But let’s keep the next year to the next year, let me do something that a lot of you asked about: The Muppet Show “theme” for Microsoft Dynamics NAV 2018.

In short, this thing:

Continue ReadingBy popular demand: The Muppet Show theme

NAV TechDays 2018 – Evolution of a titan: a look at the development of NAV from an MVP angle

  • Reading time:2 mins read

In 3 days, it’s game-time again.  THE best DEV conference for Business Central will take place in Antwerp: NAV TechDays – and I’m honoured to be a part of it again.  But this year – it’s quite different, because I signed up for a challenge.  This year, I’ll be joining Waldo on stage for a very special session:

Evolution of a titan: a look at the development of NAV from an MVP angle

If you think this would be a boring look back at the stuff from the past that you can read about on wikipedia – you would be badly mistaken.  Here is the link to wikipedia, because you won’t get that from our session.

We are not there to talk about the past.  We are there to talk about what challenges – no, opportunities – are ahead, and how we as developers can act upon these challenges.  We will talk about (what we think as) the most important parts of the technology stack that has touch points with NAV (sorry, “Business Central”), and what impact it has on the future perspective.

And – Waldo wouldn’t do a session without killer demos (that’s why he asked me to join .. ).  Prepare yourself for no less then 45 minutes of no-nonsense-cutting-edge-demos that will blow your socks off (bring an extra pair, just in case!).

I don’t know about you, but I’m very excited to do this session together with Waldo – if you have seen any of his sessions, you know it will be totally worth your time!

See you there on Thursday at 4pm!

Continue ReadingNAV TechDays 2018 – Evolution of a titan: a look at the development of NAV from an MVP angle

NAV TechDays 2018

  • Reading time:3 mins read

Let me ask you something. What do you do on November 22 and 23, 2018? Well, let me not ask you what you do, let me tell you what you do: You attend NAV TechDays 2018.

In the very unlikely case you just landed on this planet from outer space, and don’t really know what NAV TechDays is, then let me know that it is the #1 technical conference about NAV, that has been running for 8 years now, since 2011. It’s cram-packed with cutting-edge technical content about NAV (and BC), delivered by the top people in the NAV world, including Microsoft’s team that’s building the technology, MVPs, and other renowned technical experts in the field. If you are serious about Microsoft Dynamics NAV (or Dynamics 365 Business Central) and you consider yourself a techie, then there can be absolutely no excuse for not attending NAV TechDays.

TechDays is so much different than other NAV conferences, and here’s why:

  • It’s 100% technical content. You won’t find level 100 or 200 sessions here, it’s all deep dive, highly technical content. You won’t find any marketing content here.
  • It’s 100% kick-ass content. NAV TechDays has far more content submissions than the number of sessions they can accommodate, and this makes only the top of the top of the top content to be selected. Not everyone can be a TechDays speaker!
  • It’s 100% passion, distilled. You’ll hear people share their experience, their tips and tricks, you’ll hear them spread their love for the product. You’ll see passion on stage, you’ll see passion in the audience.
  • It’s 100% original format, no other conference does it. It’s only 2 parallel tracks at any given point in time, and it’s 90 minutes per session. At TechDays, when you want to learn something, you really get to learn about it.
  • It’s 100% about NAV. No AX, no CRM, no nonsense.

If you are still not sure if you need to be there, then this is why you absolutely need to attend:

  • You get to meet your colleagues and peers. It’s 100% technical conference, targeting developers, so you won’t get to meet marketers, salespeople, or generally non-technical folks.
  • You get to talk to Microsoft people, the folks that define the architecture of NAV, the folks that write its code, the folks who know it inside out.
  • You get to see some amazing products built on NAV and for NAV in the expo area. Even there, you won’t talk to your regular salespeople – these are also mostly technical folks, eager to show off their product and discuss it.
  • You get thousands of new ideas, and you expand your horizons. Some sessions will really blow your socks off.
  • You get gallons and gallons of free beer! Come on, this is Belgium, the place where the finest beer is brewed. And you get all of it for free. Honestly, can you beat this?

And if you are still not convinced, consider this: every year, for past seven years, NAV TechDays was the only NAV conference that was publishing all of its content, online, for free, very soon after the conference. And yet, they still full up, and they still grow in attendance numbers year over year.

To wrap it up, if you consider yourself an NAV developer, and you have never attended NAV TechDays, you haven’t lived. Be there. So, go, grab your ticket before it’s too late, and…

… see you in Antwerp!

Continue ReadingNAV TechDays 2018