Category Archives: Dynamics NAV

Working on Design Patterns for Business Central

Yesterday at Microsoft I had two meetings, or goals. The first as you know was about our initiative to do a proof of concept to break the BaseApp into smaller extensions.

The second meeting was about revamping the old Design Patterns we had for Dynamics NAV and bringing them up to speed for Business Central.

For those of you who don’t know or to refresh memories; a few years ago there was a joint project between Microsoft and the community to document Design Patterns.

The old patterns wiki still exists but there have not been any updates.

Enum != SchemaChange

I love a nerdy title and I love learning about cool new smart stuff.

But before you continue reading I want to say thanks to my colleagues at ForNAV, especially Michael Nielsen. Without him pushing me (again) to step out of my comfort zone this would not have been possible.

Yesterday I visited the Microsoft office in Lyngby for the first time in a very, very long time to talk about our project to split up the base app. We also talked about something else, but that will be another blog. (Soon…).

How To, Part I | Breaking a Monolyth

I often wonder how I find myself in situations like this. On my day off I find myself behind my desk doing something which is not my responsibility, nor am I getting paid to do it.

If you say A, you also have to be willing to say B and C. This is what my parents told me when I was young so when I promissed Bugsy and Jesper to look into making the Business Central Base Application smaller I decided I may as well make it into a decent project.

Breaking up BaseApp | Business Central

Social media is fantastic and it can be used in many different ways. Where most people are mostly consumers others use it to ask questions. Some share knowledge and experience and gain loyal followers. This is pure awesomeness and mostly rewarded with the Microsoft MVP award for those who don’t give up.

Drive Change

Very few succeed in using social media to drive change. Those who do are known by many such as Elon Musk and Greta Thunberg.

Submitting to Business Central Open Source, the code review…

So to continue where we left off yesterday when I did a pull request on the Business Central System App project on GitHub.

After my pull request someone at Microsoft did a code review in order to make sure quality standards are respected. Here are the details:

I have to admit something. First of all, this is not actually my code. It came from my colleague Michael Nielsen. Secondly this blog post is a bit orchestrated since Jesper and I discussed in Antwerp at NAVTechDays how to promote people contributing.

Working with Microsoft is pretty tough since your doing code for millions of users, not just one customer. Business Central should be easy to use and if you call the culture info with for example 0 or 80,943 you’ll get an error explaining that the language does not exist but not in an easy to read way.

I’m tempted to follow the idea to wrap the call in a TryFunction, but that means introducing a readeable error message, which includes translation and I am worried that will delay my pull request.

An alternative is to wrap it into a try function and return the orriginal integer if the call fails.

What do you think? It proves to me that coding for millions is a lot harder than it looks.

Business Central System App is Open Source! Contribute, don’t be shy…

With the recent Wave II release of Business Central we also got the first wave of Open Source in our beloved NAV/BC product.

This means that rather than making customization for one specific customer or ISV you can now have this pushed back into the product and stay there forever.

Today I did my first Pull Request and I wanted to share how I did that.

What did I need?

With reports, especially documents that go out, translations are key. In the next release of our ForNAV extension we wanted to add a new feature where you can translate invoices by simply adding captions to a table or import them from an Excel sheet or Azure Blob Container file.

With translations there are rules that allow you to inherrit languages from related languages if they are related. For example Flamish (NLB) can be inherrited from Dutch (NLD).

Especially in Europe this drastically reduces the number of translations and you only have to manage exceptions where terminology is different. (Trust me, this is the case with Flamish and Dutch).

DotNET

I actually only need one line of DotNET code

CultureInfo.CultureInfo(LanguageId).Parent.LCID

Normally you are not allowed to do DotNET, but System App has target set to OnPrem so simple usages of DotNET are actually allowed. (I hope).

Fork & Clone

The first step is to log into GitHub and Fork the Microsoft ALAppExtensions project and clone this to your Visual Studio Code

Branch & Publish

Then you do the change. Remember Microsoft has this two-layer model where your real code is in the implementation.

Pull Request & License

The final step, or at least where I am now, is to do a pull request and sign the license.

After this you need a code review and this is what I am waiting for right now.

Tip #65 | AppSourceCop & mandatoryPrefix

Today I was a bit puzzled by getting this error message and how to fix it.

error AS0054: The AppSourceCop configuration must specify one of the following properties: 'mandatorySuffix', 'mandatoryPrefix', or 'mandatoryAffixes'

Yes, you can google the message but that only brings you to pages that describe the message, not how to fix it.

It appears to be easy so I wanted to spare others the time.