Manufacturing quickie

  • Reading time:4 mins read

Today, I got an e-mail from a reader of this blog, who asked me to help them with an actual problem on a project. Their customer is a small manufacturing customer in textile vertical. Whenever they calculate consumption, quantities for certain items get rounded to full numbers. Since the items are usually textile, measured in meters, a consumption of 1.27 meters can end up registered as 2 meters instead. Not that it’s something which can’t be overridden manually, but it is pain in the butt, and hey, why do we have computers in the first place if we have to do their job.

Continue ReadingManufacturing quickie

Code of coding

  • Reading time:5 mins read

Code is boring. It is geeky. And it’s ugly, too. In C/AL it is especially ugly. While contemporary development tools come with all sort of gizmos which make coding easier, such as color-coding, auto-completion, refactoring, etc., C/AL editor seems like having awaken from a thousand-year sleep. Take a look at the color coding: there is none. Or there is, but palette is limited to that of Charlie Chaplin’s. There is some functionality which looks like auto-completion but it is not, and the text editing capabilities make you dream about Notepad at night. But you can look at it from a different angle. C/AL editor is the way it is for a reason: to keep programmers away. It’s the defence mechanism developed over twenty or so years of evolution of the system, to protect the system from rookie knowitall programmers ripping away that stupid Gen. Jnl.-Post Line codeunit and rewrite it the way it should be. With this, we come to Rule No. 1: Know what you are doing.

Continue ReadingCode of coding

Why doesn’t my filter work?

  • Reading time:2 mins read

Today I got a comment from another soul out there, spending their time blogging about Microsoft Dynamics NAV. I’ve immediately put the link to my blogroll, and it really deserves it, because it is the best blog on the topic I’ve seen so far.

Few days back, on that blog, there was a post about setting filters, which didn’t work as expected, and you had to write a wordy workaround for a thing that should work as expected, but surprisingly it doesn’t.

Continue ReadingWhy doesn’t my filter work?

Silent Abort

  • Reading time:4 mins read

There is only one way to abort a user action in Microsoft Dynamics NAV: by using the ERROR function. This function essentially stops the execution of all code, and prevents completion of the user action, whatever such action might be.

One of typical situations where ERROR is used to prevent user action is during validation of a new value in a field. A typical concrete example of this behavior is entering the Customer No. value in the Sell-to Customer No. field on the sales order form. When users enters a value, the system goes through a series of checks, called validation, which in the end may result in the system rejecting this value. Obviously, the only way for the system to reject a value entered by the user is, yes you’ve got it, by calling the ERROR function, which returns the system to the last committed state before the error.

Continue ReadingSilent Abort

Alive and kicking

  • Reading time:1 min read

Whoa, this has been a looooong pause. If you come across some presentation, rhetoric or speach theory, most of them agree on an idea that it’s not the words that make a speach a of art, but the pauses. If the same applies to blogging, I must be quite an artist.

Last time I was here, sometime during the previous geologic era, I said that not much is going to change with this blog. How young and stupid must I have been to say such a thing, because since then everything changed. For starters, I stopped blogging. Not a big deal, if you take into account the number of people hanging around over here. But here’s the real catch and the true change to this blog. The number of people reading it increased at an infinite rate: from zero, to one. It took me almost two months to notice it, allright, but nevertheless, I hope I am not going to turn this single reader down.

 That’s it, this was just a short note, before I get to writing the next post. A real one. Just about now.

Continue ReadingAlive and kicking