Dynamics 365 Business Central Queries: Erm…where are the rest of my rows?!
Aug08

Dynamics 365 Business Central Queries: Erm…where are the rest of my rows?!

This is a bit off-topic to what I’ve been blogging about lately but I’ve been caught out by this before and the other day so was a colleague so I thought it was worth a post. TL;DR Be careful of the difference between DataItemLink and DataItemTableFilter properties. DataItemLinks define the join between the dataitems in the query while DataItemTableFilters are applied to the results… Continue Reading james’s...

Read More
Working with Translations in Dynamics 365 Business Central
Jul31

Working with Translations in Dynamics 365 Business Central

Intro Languages: what an almighty headache. Computerphile have a great video that describes just how big the problem is: https://www.youtube.com/watch?v=0j74jcxSunY Perhaps my perception is skewed by my ignorant native-English-speaker point of view. I haven’t grown up in a country where learning multiple languages and being able to switch between them is essential. Sure, I wish* I could… Continue Reading james’s...

Read More
Building Microsoft Dynamics 365 Business Central Apps on Azure DevOps Hosted Agents
Jul09

Building Microsoft Dynamics 365 Business Central Apps on Azure DevOps Hosted Agents

This is a quick follow up to this post. If you want an intro to building AL apps for Business Central you might want to check that out first. In order to build your apps you need a build agent running somewhere which will listen for new jobs and run the scripts, create the Docker containers, run the tests or do whatever else you define in the build file. You can install an agent on your… Continue Reading james’s Article on...

Read More
Building Microsoft Dynamics 365 Business Central Apps with Azure DevOps
Jun24

Building Microsoft Dynamics 365 Business Central Apps with Azure DevOps

Last time out we were discussing defining your build pipeline in a YAML file. That post was an intro to what pipelines are and the benefits of defining the tasks that it runs in a YAML file alongside your other source code. Now we’ll turn our attention to some Business Central specific considerations. Objectives We’re start by defining the key objectives of the build… Continue Reading james’s Article on their...

Read More
Working with Azure DevOps Pipelines in YAML – James Pearson
May21

Working with Azure DevOps Pipelines in YAML – James Pearson

Overview This post is an update to a post I made about YAML pipelines here. We’ll also take the opportunity to discuss why you might want to define a pipeline with YAML. Wait…What? What the heck are we talking about? (skip this bit if you do know what we’re talking about) A pipeline defines a series of tasks, running on defined environments that are performed with your code…. Continue Reading james’s Article on their...

Read More
Testing Your Microsoft Dynamics 365 Business Central Tests – James Pearson
May13

Testing Your Microsoft Dynamics 365 Business Central Tests – James Pearson

Seeing as I’m on a bit of a run of posts about testing, let’s look at it from a slightly different angle. Testing the Test If we’re going to rely on automated tests to verify that our code (still) works then we need to have confidence that the tests themselves actually work. Writing the Test First This is why it is helpful to write and run the tests first. When you start developing a… Continue Reading james’s Article on...

Read More
Part 3: Testing Microsoft Dynamics 365 Business Central from VS Code
May01

Part 3: Testing Microsoft Dynamics 365 Business Central from VS Code

Another instalment of my musings on running automated tests for Microsoft Dynamics 365 Business Central from Visual Studio Code. Objective What are we up to this time? As a brief reminder, I’m trying to make it as easy as possible to run automated tests from Visual Studio Code. I figure the faster and simpler it is to publish your code changes and run the tests the more inclined you are going… Continue Reading...

Read More
Part 2: Testing Microsoft Dynamics 365 Business Central from VS Code
Apr29

Part 2: Testing Microsoft Dynamics 365 Business Central from VS Code

Last time out we went through running automated tests from the PowerShell terminal integrated into VS Code. We saw that you could define a task in the tasks.json file to run the tests and assign a keyboard shortcut for that task. Great. But. In order to run tests they first need to have been added to a test suite. You could add some code to an install codeunit in your app to do that for you (

Read More
Testing Microsoft Dynamics 365 Business Central from VS Code – James Pearson
Apr23

Testing Microsoft Dynamics 365 Business Central from VS Code – James Pearson

Execute your Microsoft Dynamics 365 Business Central tests – with a keyboard shortcut – without leaving the comfort of your favourite IDE. What’s not to love? Background We’ve come a long way with testing our apps in Microsoft Dynamics 365 Business Central / NAV. By “we” I mean our internal development practices but also the capabilities of the platform. We didn’t have any… Continue Reading james’s Article on their...

Read More
Calling SOAP Services from PowerShell – James Pearson
Apr09

Calling SOAP Services from PowerShell – James Pearson

Like most of my posts this has its origin in Microsoft Dynamics 365 Business Central development – specifically our build process – although it isn’t limited to that. We had a need to call a SOAP web service from PowerShell (see below for the background if you’re interested). In the past I’ve used Invoke-WebRequest and added content-type and a SOAPAction header to the request.

Read More
Chaining Builds in Azure DevOps – James Pearson
Mar27

Chaining Builds in Azure DevOps – James Pearson

We are triggering a lot of builds in Azure DevOps these days. If anyone so much as looks at an AL file we start a new build. OK, that’s a small exaggeration, but we do use our build pipelines for: Continuous integration i.e. whenever code is pushed up to Azure DevOps we start a build Verifying our apps compile and run against different localisations (more of that another time) Checking… Continue Reading james’s Article on...

Read More
An Approach to Package Management in Dynamics 365 Business Central – James Pearson
Mar18

An Approach to Package Management in Dynamics 365 Business Central – James Pearson

We use PowerShell to call the Azure DevOps API and retrieve Build Artefacts from the last successful build of the repository/repositories that we’re dependent on. Over the last few years I’ve moved into a role where I’m managing a development team more than I’m writing code myself. I’ve spent a lot of that time looking at tools and practices in the broader software development… Continue Reading james’s Article on their...

Read More
Getting Started with the Azure DevOps API – James Pearson
Feb28

Getting Started with the Azure DevOps API – James Pearson

Azure DevOps is pretty sweet. Manage your code, backlog, sprints, builds – the whole caboodle. Also, it has a comprehensive REST API so you can access your data and integrate with DevOps from anywhere you like. Ever since we started with DevOps (VSTS, TFS) we created some PowerShell scripts to integrate with it for Dynamics NAV development. They’ve become an indispensable part of a… Continue Reading james’s Article on...

Read More
Working with Version Numbers in Dynamics Business Central / NAV – James Pearson
Feb07

Working with Version Numbers in Dynamics Business Central / NAV – James Pearson

Specifically I’m talking about assigning version numbers to your own code and manipulating those versions in CAL / AL and PowerShell. There are lots of different systems for assigning a version number to some code. Some incorporate the date or the current year and day number within the year. Loads of background reading here if you’re interested. The system we typically follow… Continue Reading james’s Article on their...

Read More
5 Things – James Pearson
Jan31

5 Things – James Pearson

Visual Studio Code has moved quickly from “what’s that? Part of Visual Studio? No? Then why did they call it that?” to become the hub of much of my daily work. This post contains a few of the things (5 to be precise) that I’ve done to make it work better for me. Maybe you can glean something useful. Maybe you can teach me something about how you use it – post a comment. You can… Continue Reading james’s Article on their...

Read More
Regular Expressions in Visual Studio Code Search – James Pearson
Jan16

Regular Expressions in Visual Studio Code Search – James Pearson

Having spent years developing in C/SIDE I still get a little giddy using Visual Studio Code’s modern IDE features. You know, finding references to a function, renaming symbols, peeking definitions. Also, being able to search across all of your source code. What a dream. Even better, you can search for a regular expression – that very powerful, if not slightly bonkers, way of searching… Continue Reading james’s Article on...

Read More
An Introduction to Pull Requests in Azure DevOps – James Pearson
Jan09

An Introduction to Pull Requests in Azure DevOps – James Pearson

I’ve previously written about our experience with source control and our eventual migration to Git. I said that pull requests in Azure DevOps are awesome and are one of the biggest reasons to consider the switch to Git. In this post we’ll dig a little more into the details of why they are so good and how to use them. Before we start, don’t forget that code review (i.e. pull requests… Continue Reading james’s Article on...

Read More
Automatically Creating a CI Pipeline in Azure DevOps with YAML – James Pearson
Nov29

Automatically Creating a CI Pipeline in Azure DevOps with YAML – James Pearson

TL;DR Name your yml file .vsts-ci.yml and put it in the root of your project. What Does the Title Mean? There is a lot of chat about build pipelines and continuous integration (CI) at the moment. For the uninitiated let’s break down the title of this post: CI = continuous integration, the practice of integrating ongoing development into your master development branch as soon as… Continue Reading james’s Article on their...

Read More
Integration Between Extensions in Dynamics 365 Business Central – James Pearson
Nov12

Integration Between Extensions in Dynamics 365 Business Central – James Pearson

Extensions provide the opportunity for us to write and maintain our code in tidy, discrete blocks. This is good for separating concerns and breaking our functionality into logical pieces. But how do we get those pieces to play nicely together? The topic is probably best discussed with an example. Imagine that you’re writing some functionality to pull some files, handle them in Business… Continue Reading james’s Article on...

Read More
Extensible Enums in Dynamics 365 Business Central – James Pearson
Nov05

Extensible Enums in Dynamics 365 Business Central – James Pearson

Option fields: great for scenarios where you want to provide a fixed, predefined list of values. Only a single value can apply and the user gets a convenient dropdown to select from. Perfect, until you want to extend the list of values. Enter enums. Documentation is here: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-extensible-enums Enums are… Continue Reading james’s Article on...

Read More

Extension Settings in Microsoft Dynamics Business Central – James Pearson

Recent builds of Business Central introduce a check when your app attempts to call an external service through the HttpClient type in AL. The user will see a message like this: “The extension [extension name] by [publisher name] is making a request to an external service. Do you want to allow this request?” This decision is saved into the database and is editable from the… Continue Reading james’s Article on their...

Read More
“About This Page” in Dynamics NAV 2018 – James Pearson
Oct22

“About This Page” in Dynamics NAV 2018 – James Pearson

My original post about adding some “About this Page” functionality to the web client for Dynamics 365 Business Central has received a bit of attention – enough to demonstrate that there is demand for this in the standard product. Hopefully, this is something that Microsoft will address in time. They certainly won’t address it, however, for Dynamics NAV 2018. You’ve still got… Continue Reading james’s Article on their...

Read More
Business Central Tenant Management – James Pearson
Oct15

Business Central Tenant Management – James Pearson

One of our apps calls for Business Central to communicate with our external service some key details about the tenant: The Azure tenant id The type of environment (production or sandbox) but how to get at those details? Maybe I’m a simpleton and maybe the information is out there somewhere and I just couldn’t find…but I couldn’t. Turns out there is a codeunit (#417)… Continue Reading james’s Article on their...

Read More
Business Central Development With CI/CD – James Pearson
Oct09

Business Central Development With CI/CD – James Pearson

If you follow blogs about Dynamics 365 Business Central / NAV development, attended development sessions at Directions or have seen the schedule for NAVTechDays then you may have noticed the terms “CI/CD” or “pipeline” being thrown around. What do those terms actually refer to? And how does it affect the way we approach development? CI = “continuous integration”CD =… Continue Reading james’s Article on their...

Read More
“About This Page” in Dynamics 365 Business Central – James Pearson
Oct04

“About This Page” in Dynamics 365 Business Central – James Pearson

We’re entering a brave new world of web-client-only experience with Dynamics 365 Business Central. That is simultaneously great news and presents a challenge for those who know and love the Windows client. It doesn’t take long for most consultants to realise that they can’t view the “About this Page” (Ctrl+Alt+F1) page in the web client – and to get upset about that. In my… Continue Reading james’s Article on their...

Read More
Source Code Management: Conclusions – James Pearson
Oct01

Source Code Management: Conclusions – James Pearson

I stated in the first post in this series that I wasn’t going to offer any advice. I will, however, attempt to draw some conclusions from our experiences and hope that you’ll find them helpful, or at least interesting. A few months before we trialled Git in earnest as a team I tried it out for myself. I had a look because I’d heard various reasons that we should… Continue Reading james’s Article on their...

Read More
Source Code Management: Migrating to Git
Sep26

Source Code Management: Migrating to Git

This is the third post in a series about source code management. You can start here if you haven’t read the others in the series. There we were, happy as the proverbial Larry, checking our code into TFVC, requesting code reviews, branching, merging, viewing file history, comparing versions, annotating and writing a lot of PowerShell to automate tasks with the VSTS API. We were feeling pretty… Continue Reading james’s...

Read More
Adopting TFVC – James Pearson
Sep24

Adopting TFVC – James Pearson

This is the second post in a series about source code management. If you haven’t already read the beginning of the story you can find it here. We’d realised that we’d outgrown our system of one-developer-per-customer and ad-hoc communication between teams about ongoing changes to objects. We needed some more structure and somewhere safe to keep previous versions of objects. We… Continue Reading james’s Article on their...

Read More
A Trilogy in Four Parts – James Pearson
Sep20

A Trilogy in Four Parts – James Pearson

It seems hard to believe now that we ever developed working software without using any source code management system – but we did. For a long time. And judging by the straw polls taken in sessions at NAV conferences lots of partners still do. In this series of posts I am not intending to dispense any advice based on my own meandering experiences. I’m not Baz Luhrmann. I’ll also… Continue Reading james’s Article on their...

Read More
great, but not just for that reason – James Pearson
Sep17

great, but not just for that reason – James Pearson

It’s easy to imagine that code review is just about monitoring the quality of the code. Squashing bugs, checking best practices have been followed, sniffing out code smells etc. It is good for that. Having someone other than the original author cast an eye over the development is useful – it’s very difficult to objectively check code that you have written and think already works… Continue Reading james’s Article on their...

Read More