Leveraging TestField as Actionable Errors

Leveraging TestField as Actionable Errors

As a Business Central Developer, we know that the quickest and easiest way to check if a field has a value is to call the TestField method on a Record. When used, the system checks to see if the field is not zero or a blank string. If there is not a value, we are used to getting an error.

TestFields have gotten some love at the platform level to help users quickly solve data problems and continue in their processes. This blog post will walk you through the changes in system behavior, and how to tweak your code to maximize user efficiency.

Read More »

#HumpDayHacks: RecreateSalesLines

Have you ever seen a custom Sales Line field’s data just disappear? You sit there wondering why is that getting cleared out.

There is a procedure on the Sales Header RecreateSalesLines() that deletes and rebuilds all lines for the document after key header changes. It copies existing lines into temporary tables, validates header-driven changes, and then re-inserts lines via CreateSalesLine().

Read More »
#HumpDayHacks a cat sitting at a desk in front of a camel standing on a football field

#HumpDayHacks – Avoiding Validation Chaos

Have you used the AZ AL Dev Tools New AL File Wizard to create objects? It’s probably as fast as my cats running into the kitchen when they hear the pantry door open.  Quick, efficient, and surprisingly satisfying.

But speed isn’t everything, especially when it comes to creating pages in AL for Business Central. If you’re not careful, that lightening-fast setup can lead to subtle issues that only show up later when your page doesn’t behave quite the way you expect. One of the most overlooked culprits? Field Order.

Read More »