FIELDERROR. FIELDERROR? Yes, FIELDERROR!

On the first day of the Solution Development training I conducted last week, we discussed one of my favorite topics: posting routines. As with many in the past I armed my course students with highlighter pens in 5 different colors and let them attack the print outs of codeunits 211, 212 and 213. To structure and thus gain insight in these three basic posting codeunits.

An easy and effective method, for which I owe credits to Jason Prickett, my former trainer at Navision Software US back in 1999. A method that always rouses enthusiasm one way or the other. Be it simply coloring like we used to when we were young with color stains all around our hands and faces even, or the wow effect of suddenly understanding more of the code. And last weeks session wasn't much different from that including - yes, the detour has come to its end, here we get to the topic of this post - FIELDERROR. FIELDERROR? Yes, FIELDERROR.

I am pretty sure that many of you reading this wonder what is so interesting or remarkable about FIELDERROR. Well, not much, a standard C/AL field method which has been around in NAV for ages and well documented in the C/SIDE Reference Guide. But at the same time many student seem to fail to have colored this function orange (see the page above) not knowing this functions operates on, or belongs to, the ResJnlLine variable. Or even more: not even knowing about this functions at all. Well, live is simple only if you know, ain't it? A standard method that helps you to raise an error with respect to a specific field. Go out there and read it, if this is still new to you. Go out and use it.

Break, pause, time-out and ... part 2

Friday afternoon, driving home after the second course day I thought: "How come?" How come? How come that apparently this is not known as you might expect?

Every NAV developer knows about ERROR, knows about TESTFIELD, I am quite sure. So why does not every developer know about FIELDERROR? And here my statistical counterpart comes around. Would there be a significant difference between the occurrences of ERROR/TESTFIELD and FIELDERROR?

So back home I woke up my laptop, launched my XP mode virtual machine, opened the cmd and ran the good old findfunc on the full .txt object export of NAV 2009 R2  searching for all ERROR statements (including FIELDERROR) and once more to get all TESTFIELD statements. With this I fed the EXCEL sheet I had once build for a similar kind of exercise (one I am quite proud of as simple as it is Geeked).

So is FIELDERROR's unfamiliarity a matter of statistics? Draw your own conclusion.

Anonymous
Related
Recommended