Quantcast
Channel: Waldo's Blog Microsoft Dynamics NAV & Business Central
Viewing all 336 articles
Browse latest View live

CRS AL Language Extension – version 1.1.0

$
0
0

My last blog about my VSCode extension dates from July 2018. I have been upgrading/maintaining it meanwhile, and I am definitely not going to blog about all new small features and fixes (yes, quite necessary as well ;-)) every single time, but for this one, I really felt that an update wouldn’t hurt.

What is the “CRS AL Language Extension”?

The extension I’m talking about here is a free extension for VSCode that you can use to make your life for Microsoft Dynamics 365 Business Central App Development a little bit easier. The main parts of the extension are:

  • Running objects in windows client and web client
  • Automatically managing file names (and locations, if you want)
  • Prefixing and/or suffixing (same link as above)
  • A crapload of snippets for anything AL (also permissionsets, web services, design patterns, …)

If you want to know more, I can strongly advise you to have a look at the extension:

It has a staggering +37000 downloads and +12000 installs today, which is amazing :-). Thank you so much for using it – and for the many contributions on GitHub!

Let me now dive deeper into some points that are new to this release.

Rename/Reorganize files with git

“git” is the main word here. The extension can rename/reorganize files for quite some time now. If you want to know how it works, please read here.

There was a big disadvantage on this functionality: you would lose your file history, because for Git, this would be a delete file, and create a new one. The right way to rename a file, is actually using ‘git mv’, like Chris Blank pointed out on my GitHub. He was more than right, so I got to work, and after many attempts (and ways how not to do it), I seem to have finally succeeded. As this is a major thing, I didn’t want to just enable it by default (yet). Instead, I introduced a configuration setting “CRS.RenameWithGit” which you can set to “true” in your settings.json. At this point, the default setting is false, as I want people to deliberately set and test the feature first ;-).

FYI: it also works for the “Reorganize” function ;-).

Now, you can just decide in the middle of the project the completely revise your naming convention, and still keep your file history intact. How cool is that! :-).

The result is that you will have a part in “staged” and another part not. The staged part is the renamed-files, while the unstaged part is changes in the content of the file. Advised is to commit the staged first, and then commit the rest. As you can see in this screenshot:

The staged files are indicated with a green “R“, which indicates it was renamed. At some point, I might commit these files automatically (give me feedback on that if you want that).

Output Window

I also added an output window, where I log the execution of the different actions the extension is executing for you. Just go to the output panel, and select the channel “crs-al-language”:

Very interesting because the links actually work, and you can see at the end of the day how useful the extension has been for you ;-).

New buttons to run an object

At the MVP Summit last week, I attended a session on “VSCode Extension Authoring”, where I got some ideas that I thought were interesting. A few were easy to implement, so I gave it a try, namely: running an object in the web client from:

  • The status bar: when you have an al-file active, you will see a button in the status bar which you can click:
  • And as you would guess, it opens that object in a web client.
  • The file explorer (right mouse). The same functionality when you use the right mouse button in the file explorer:

I find myself using this all the time :-).

API

Something I didn’t do, but was completely implemented by somebody else, is the API for this extension, which basically means: other VSCode Extension can use the functionality of this extension by creating a dependency :-).

I’m very grateful to Andrzej Zwierzchowski, who implemented it in my extension by this pullrequest, to be able to use it in his “AL Code Outline“-extension.

I even noticed that also the “AL Object Designer” is using my extension as a dependency

Cool stuff! If you don’t know these extensions, well, after you have crawled out of the bottomless pit of shame, download and install them, like I did :-)!

The Change Log

Every single update, I announce on twitter, but more importantly, I maintain the changelog in a quite detailed manner. You can find a link to this changelog on the Marketplace-site for the extension, as well as the extension-page in VSCode:

So don’t forget to check once-in-a-while, to see what changed :-).

Provide feedback

If you have any questions or think I’m missing something, you can always either fork, do it yourself and create a pullrequest, like quite some people already did(for which many many thanks!), or simply provide feedback on the Github Issues that belong to this repo. Anything is always greatly appreciated!


Microsoft Dynamics 365 Business Central – 2019 Spring Release

$
0
0

I’m not attending Directions ASIA this year – and it doesn’t really feel good. There is a major release around the corner, and I have to experience it through social media – I hate it! But that’s life – my wife is going live with a huge project, so I had some duties at home ;-). Luckily, the go live is going quite well, so it seems to have been worth it ;-).

Having said that – the below blogpost is actually completely redundant. In fact, when I finished it, and was reviewing it, I came across this article on Microsoft Docs: What’s new and planned for Dynamics 365 Business Central. But hey, I’ve put the work into it, and I put some of my own thoughts into it – who knows it’s still interesting to read ;-).

As said, there is a major release around the corner. And since we don’t have version numbers anymore (actually, we have… I assume this is going to be version “14”), let’s just call it:

Microsoft Dynamics 365 Business Central – 2019 Spring Release

The information that I will list here, is merely from twitter/facebook/.. . So definitely second hand – definitely not complete – and definitely only from my interpretation! Let that be a big fat disclaimer.

But nevertheless, let’s list what I learned from social media today:

Last release with C/AL and Windows Client

I think the most important piece of information was the fact that this release is the last release that will contain C/AL, and also the last one with the windows client. Just look at these screenshots from Alexander Totovic:

and …

Enjoy the last 6 months of windows client, people ;-)!

To quote Kamil Sacek: “from 12-24 month announced on 2018 is 12 month in reality!” ;-). Indeed, the last roadmap, it said that it might happen from 12 to 14 months – I guess it has become 12 months.

What does it mean for code modification in the base app? Well, you will still be able to do it, according to Tobias Fenster.

Focus on security, stability and performance

In the keynote, it was clear that this release had a very strong focus on these three pillars:

  • Stability
  • Security
  • Performance

(screenshots by Dmitry Katson)

And going forward, the points that I will address, kind of indicates that.  Let’s … get … started …

Technical Enhancements

Last Error

We already had the “system information” page in business central, which showed the last error, which I blogged about some time ago here. But now, they got the error info out of it (it seems), and created a new page “Error Details”, which shows like this (screenshot Tobias Fenster):

It brings more possibilities to the user as they can figure out in the application of what’s wrong – but also for developers this is interesting, for example to know where to put breakpoints ;-).

Force Sync

As you know, while developing extensions, it was “challenging” to keep the data. If you do a breaking change (like removing a field), it could happen that you had to remove all data (from the extension) to rebuild it.

Well – this release brings a “force sync”!

Screenshot from Saurav Dhyani:

This solves a LOT of frustrations ;-).

Configure Context-Sensitive Help

May be something we don’t really think about, but definitely important to realize it exists! From this release, we will be able to apply context sensitive help. More info on Microsoft Docs!

APIs

This time, APIs are not in Beta anymore, and will be v1.0. Which means: API contract is fixed, but also versioned ;-). If you need to extend APIs, you can obviously create your own!

Screenshot by Dmitry Katson:

Tharanga shared that Business Central now exposes all Standard APIs as “Open API 3.0” standard.

Which seems to bring “auto documentationand auto SDKs”. Screenshots from Dmitry Katson:

I have to be honest – I have NO IDEA what that means, but I’m sure that’s a good thing ;-).

Even more, Dmitry Katson shared that the APIs are in MsGraph now!

And let’s also mention “web hooks! Or at least, let Dmitry do that ;-):

Business Central Admin Center

When you are a CSP and sell SaaS implementation of Business Central, you probably know about the Business Central Admin Center. It would be weird if you would not know about it, because this is where you maintain, handle, set up, … your customers.

With this release, a lot of new features are introduced into this portal. Just to name a few:

  • Schedule upgrades for customers (screenshot by Tharanga)
  • Multiple sandboxes. Another thing we have been waiting for a long time :-). Now we can do it, and even more: we can choose a BC version (like ‘next’ or ‘preview’) to test our developments even against an upcoming version. Very necessary, and it’s there now! Indicated here by a screenshot from AJ:
  • Monitoring and notifications– you can subscribe to receive notification of more events happening in your customers’ environments.

Enhancements Intelligent Cloud for Dynamics SMB and Business Central

As I’m not intelligent enough to tell you anything about the intelligent cloud and its enhancements .. But I’m just going to leave this here for you ;-): https://docs.microsoft.com/en-us/business-applications-release-notes/april19/dynamics365-business-central/enhancements-intelligent-cloud

In-Client Designer Dependency Pruning

When you were using the in-client designer in the previous release, it created dependencies for all extensions in the database. This didn’t make sense, and caused a lot of problems going forward (where you had to remove the unnecessary dependencies). It was the exact reason why I hated the tool.

Well – it’s fixed now ;-). Only the necessary dependencies are there now! Time to give this tool another go – may be now it can be a real addition to a developer’s life. Screenshot from Saurav Dhyani:

Source and binary format for Runtime Packages

“Runtime Packages” is also still an area I have to dive into, just because I never had the need to hide source code (as I don’t believe that’s where is the IP). But I didn’t want to hold this screenshot from you from Saurav Dhyani:

Some more minor enhancements:

  • Max Record Size: 8060 bytes. More info here: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-object-specifications-limitations
  • Even more: text-fields can now be up to 2048 characters. But as Soren says: “Just because you can doesn’t mean you should”.
  • Data Access has changed quite a bit. The updated info is already online: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/optimize-sql-data-access
  • RAD – or Rapid Application Development lets you build and deploy only a part (the changed part) to speed up development. Now you know where the “rad.json” comes from ;-). Screenshot by Aida:
  • Many performance improvements. This screenshot from Saurav quite indicates a number of them:
  • Or this screenshot by Tobias Fenster:
  • It is quite impressive to see the performance gains all over the place, like as well in this screenshot from Saurav:
  • Let’s not forget the page inspector, like Saurav did on Twitter:
  • The debuggers (in C/AL as well as AL) now shows SQL statements to easily see what’s slow on SQL!
  • Even more, you can start the debugger now without even publishing the extension – again speeding up development. Screenshot by Saurav:
  • Code actions in VSCode is when you have a message/warning from one of the code analyzers, you can “take action”. The famous “light bulb” kind of thing in Visual Studio. This is coming to AL as well, indicated by Saurav:
  • Multiple Unique Keys– I didn’t see this on twitter, so people must be sleeping out there – but Soren blogged about it. One of the features I have been wanting for a long time – and will be using extensively :-). More info on Microsoft Docs as well!

Client and UX changes

Applying a theme

Look at this screenshot by Dmitry Katson:

I seem to be missing a “Dark Theme” though – while I’m a fan of dark themes. Microsoft?

Focus-mode & quick entry

…to easily enter lines on document pages. Screenshot by Tobias Fenster:

Saving and personalizing list views

Yep: you can save a view now :-). I’m sure users are going to love this! Screenshot from Docs:

New Keyboard Shortcuts.

As far as I know, we’re still not able to post from F9 or so (so no execution of actions on a page though shortcuts), nor are we able to configure our own shortcuts (yet?). But at least, even more shortcuts have made it to the client. More info here.

Work date indicator.

Let me explain by this screenshot from Microsoft Docs:

Autosave indicator

We are users from NAV, and we know that basically all pages our bound to the dataset – which means all data is automagically saved. For users that are expecting a cancel button, it might not be that clear. Now it is:

Improved scrolling

It seems a very simple thing – not that scrolling is faster (it might be though), but the experience is completely different. Just watch this here.

Improved contextual search

the “tell me” box is even searching in AppSource now!

Application enhancements

And if you think Microsoft didn’t work on the Application, think again! Many changes on this side – en let me refer you to Microsoft Docs for this. Just to list a few:

  • Longer names and descriptions
  • Bulk import item pictures (I wonder if they finally use the mediaset as a real set now…)
  • Default ship-to addresses
  • Background jobs with data formula
  • … (many many more)

Release Notes on Microsoft Docs

Very important – Microsoft has documented all the things we can expect in this new release. As said, I just found this link after writing this blog – it could have saved me some time ;-): https://docs.microsoft.com/en-us/business-applications-release-notes/april19/dynamics365-business-central/planned-features

Release date

I haven’t seen a definite release data. Is it already here? Next week? End of April? No clue – but I expect this Spring release to be here very soon. Will update as soon as I have it, but I’m sure you will know before me anyway .. as social media will be swamped with it ;-).

Resources

It tried to note down all resource I used to compile this blog. There are some blogs, some links to Docs, and some tweets. All worth checking out!

Microsoft Dynamics 365 Business Central – 2019 Spring Release is released!

$
0
0

You might remember my blog from yesterday… . I didn’t know when it would be released.

Well, it wasn’t available yesterday, but today, I got the comment on my blog from Daniel Göhler that it was available – so I refreshed my container again, and indeed!

I used this Docker image: mcr.microsoft.com/businesscentral/onprem:be (I assume you can use your own country-tag, or none for W1)

But I also got these links from … :

I just got this release schedule from my colleague – seems they are somewhat early ;-): https://dynamics.microsoft.com/en-us/business-applications/release/#release-calendar

Enough resources I guess. Go grab your copy and upgrade!

“In the future, on-premises will follow the cloud rules”

$
0
0

My intentional plan was to share a small blog about the Fall release of Business Central. Well – it turned out I had more to say than I imagined beforehand ;-).

I would like to focus on one point, where I’m not going to make myself really popular, as I notice quite a lot that people kind of disagree with me quite a lot :-). But that’s ok .. I don’t mind different opinions, as long I’m allowed to express mine ;-). Please take everything that follows as my opinion, and my opinion only.

Fall 2019 release

In Fall (probably October), we’ll have yet another major release of our beloved product Business Central. And Microsoft already shared their focus points in this slide:

Two points are totally not a surprise, I guess, as I announced that already:

  • The fall release will not contain C/SIDE or C/AL!
  • The fall release will not contain the Windows Client!

What I would like to do, is actually focus on the last bit. Extensions! There is going to be a strong focus for you to be able to do what you want, completely with Extensions. And even more, that last sentence:

“In the future, on-premises will follow the cloud rules”

What does that mean?

I understand this sentence can be understood in a lot of ways. And I wasn’t at Directions ASIA, so I wasn’t able to get the context of this – so I’m just going to make my own assumptions (disclaimer ;-)).

Just look at this twitter-thread from AJ and this one from Tobias. It kind of expresses some things that I will explain going forward – but at least, might give you an idea on how other people think about it as well.

Basically, I have a few assumptions that I’m going to assume is going to be the right assumptions. Assumptions² if you will .. :

  • Microsoft wants all of us in the cloud (I think that’s an easy one)
  • With Extensions only, not customizations.
  • In order to do that, it needs to bring us as close as possible to be able to be as flexible as possible to do what we do today – with Extensions. I think that’s a very fair focus.
  • Therefor – we should apply the same paradigms onprem, as we would for being “cloud ready”.
  • Customizations are not “cloud ready”. So at some point (not in Fall), customizations are NOT going to be possible anymore – even on premise.

Again, just my assumptions.

Customizations

We all like customizations, right? Well, to be honest, no. Some say it was the one thing that made NAV what it is today. Others say it implemented simplicity. I say: the simplicity to change the base app has kind of poisoned us. Sure, it’s easy on short term. But why-o-why are so many customers still running on old versions?

In anything I do with C/AL, NAV, … , I have had a strong focus of “upgradability”. Implementing with Hooks. Adopting Events. Adopting Extensions V1 .. all just to be able to upgrade. That’s my history. And a lot of my contributions were focused on that as well. Just take these blogposts into account:

I can tell you one thing: customizations do not facilitate upgrades in any decent way. From the moment you start customizing, you start creating upgrade-challenges. That’s the simple truth. One might not care, but we’re talking “cloud ready” here … and software with upgrade-challenges is all but “cloud ready”.

For a long time, Extensions has been the focus to solve that challenge. The feedback from some in the market though is a bit hesitant:

  • “I can’t do everything with extensions”
  • “I don’t have the events I need”
  • “I can’t add document types”
  • “I can’t …”

And you are all right, most probably. But in many (I won’t say all) occasions, those people make one crucial mistake. You try to do what you have been doing. That’s not how evolution works. With (r)evolution comes change. With change comes adaptability. You need to adapt. You need to change. And in terms of products, software (and yes, also customer customizations), that means: refactoring and reimplementation. Don’t act like the software you wrote 10 years ago, is still valid today. Cars are re-invented ever so long – but software needs to live forever? I don’t think so…

Our focus

The focus in our company has been extensions for a long time. For sure, we are not able to do that for everything – and for sure, we are still doing customizations. More than I want to admit. Simply by the fact: our latest product release is still C/AL today.

But … there is a focus:

  • No hybrid. What is hybrid? Why not? Well, I blogged about that here. So it’s either full C/AL or full AL. When we need to use our product today, it’s full C/AL. If not, it’s full AL. Luckily, we have quite some cases we can go the AL directions ;-).
  • We are rebuilding (from scratch) our product this year. No migration, but a complete rewrite. Because in my opinion, it’s the only thing that really makes sense for us.
  • When it’s AL, it’s Extensions only. So funky weird hybrid, no customized BaseApp (which wouldn’t be possible today anyway).
  • When we go AL (for product or customers), we only apply cloud-ready architecture.

That’s our focus today .. so not in the future, but today. Our product is the only reason why we implement C/AL today. I’m not ashamed it not being converted yet. It’s a big-ass product, and we want to take the opportunity to rethink everything carefully. “Hurry” never ended up in decent software anyway ;-)). When the product is finished, the only reason we will be on C/AL in our company would be legacy customers, while all new customers will be full AL.

Let’s dive in the above points a little bit more.

Rebuilding, no migration

Well, I know there is a txt2al tool, and there are very valid cases to use it. You won’t hear any bad word about it from my mouth. It’s just – looking at our situation – having +1000 hooks (not events) (while in extensions, I don’t want to use hooks anymore), new design patterns to be applied with extensions, … and a lot more reasons, we decided to do a rewrite with the big advantage we won’t have any legacy-stuff to solve. We will focus on one thing though – that’s trying to make sure we can upgrade data.

The good thing on this approach is that we can completely revise all functionality in terms of begin “cloud-ready”, like:

  • Remove all our .Net Interop
  • Remove all our file-based integrations (or any kind of file-based automation)
  • Focus on Service-based architecture (all funky stuff, provide (web) services for that – think “Azure Functions”)

Extensions only

Besides our product, we are currently into a 2-year development challenge for a customer, with heavily modified NAV, many integrations, .Net, file-based automation, .. and so on. An atypical heavy customized project. This project is being turned into a (set of) extension(s). I have no intention whatsoever to turn back to customizations, just because I think that my customers need to get what they expect: a way to upgrade, a way to be future-proof.

This project brings challenges for sure – but we’re getting there. I have full confidence we will be able to redo this heavy customized customer as a cloud-ready extension.

Cloud-ready architecture

I already kind of explained what I mean with “cloud ready” architecture. Basically, it comes down to being able to run it in the cloud. In essence, we need to apply the cloud-rules. And in terms of “rules” in AL development, we think of “compiler” and “code analysers”, right?

Well, what we have been applying for all our extension-projects, is very simple this:

  • In app.json: target = extension
    • So the compiler won’t enable anything that would not be able to run in the cloud as an extension, like .Net.
  • In settings.json: enable code analyzer “PerTenantExtension”, so also my code is analysed as such.

Makes sense? May be not for you, but after 9 months of development, +800 objects, it still does for us :-). Thanks to this, we have found multiple unexpected parts that we needed to refactor. “Working with files ” and “working with .Net” being the most obvious ones.

BaseApp in AL

Big news – Microsoft was able to convert their C/AL to AL! It has been in the news for quite some time, but now you have it – next release (Fall 2019), this is the only way Microsoft will distribute its codebase. And that’s a major thing. Even more – you will be able to do customizations.

Taking into account that in the future, we will NOT be able to do customizations, me personally, I don’t give one flying rats ass (sorry for my French). Cool for Microsoft to have a good conversion tool – but I won’t use it – may be to convert a set of objects (like reports) to copy, but I promise you now: I will never convert our product to AL. Just because – in my opinion – there is only one way forward. And that’s Extensions.

If you would go down the route to migrate your product/customers/… to AL, just imagine. How do you manage:

  • Support:
    • People are going to have to support those customers/products/databases
    • Now they have C/AL or Extensions
    • Then there is a 3rd scenario – a mix of default code (that you probably want to upgrade at some point), products and customizations in one codebase. In a new technology.
    • Imagine 300 customers, some have pure C/AL, some hybrid, some baseapp+customizations, some pure Extensions.
    • Good luck with that!
  • Maintenance / Upgradability:
    • Congrats, you are on the new version
    • But you haven’t progressed one singled bit.
    • Upgrades is still a pain
    • Maintenance is still a pain
    • No way you will be able to easily migrate to the cloud

I’m a bit intentionally negative here – but I think you know what I mean when I say that I will never go down the route of customizing the BaseApp (as AL). Today, full C/AL or full AL Extensions. No other way for me. The only thing we need to do is make sure our product is finished (as Extensions) by the next release.

“Don’tNet”

One of the things to be “cloud ready” is to not use .Net. I get feedback from people that sometimes there is just no other way. And probably they are right. But in many (if not most) cases, you can avoid .Net. Vjeko and me did a session on NAVTechDays last year, were one of the topics was exactly that. I can strongly advise to watch that section here:

So, there you have it – probably some of you think it’s time to unfollow me, unsubscribe from this blog, … . I strongly hope I didn’t offend anyone – this was merely an attempt to justify my opinion on things. Nothing more. I will never judge anyone for going down a route that I wouldn’t go to. Probably it would just mean that you are more organized (or more courageous) than me ;-).

Directions US 2019 – I appear to have work to do …

$
0
0

I’m returning back from yet another great Directions US event in Las Vegas this time. At this point – I’m sitting in the lounge in New York – a great opportunity to do a short post about something I didn’t really expect, and now I’m quite obligated to do.. .

I total, I did about 13 hours of sessions and workshops. That’s a lot. I never was busier – mainly because of Vjeko, who couldn’t join this year, and where I agreed to take over his sessions on Artificial Intelligence. That was a great experience – not only because it was very well prepared by Vjeko, but also for me the perfect opportunity to dive into the matter. I loved it!

DevOps

But that’s not really what I want to put on the table. I also had a session (+ workshops) about DevOps together with Freddy. My part was “DevOps in practice“, where I showed how we implemented DevOps in our company, which is a VAR and ISV – so basically: to solve the real-world development challenges in a typical Business Central partner company. The main part was that we developed a DevOps Extension for managing all the customers and products in a standard way in DevOps. My intention was to just show it as an idea on how you can manage multiple repositories in DevOps in a very maintainable way – but after the session, I had so many people that were interested in the extension. Well – my call to action is clear: let’s get it out there! I can’t tell you how I will do that, but I will definitely do my best to get it out there for you to be able to easily set up builds for products and customers, including dependencies, versioning, testability, … in a matter of minutes!

Dependency Analysis

I was also involved in a session regarding “Migrating your solution to extensions” together with Gary. In that session, I basically did again a part on “how do we do it”, where I put a lot of attention to – what we call – a “dependency analysis“. Just because in my opinion, if you think ahead, you’ll have much more chance to do it right. This analysis is mostly an automated way to visualize the dependencies of your code, based on the code that you already have written in C/AL. You might already guess that the main tool we used for this is the one I addressed in this blogpost. We combined that with an Extension and webgraphviz to visualize.

I showed how we were able to basically completely visualize our codebase like this:

And turned that into a dependent app collection, like this:

This is a generated graph, by analyzing code and tagging objects – so we are quite sure it makes sense ;-).

Again, lots of people were interested and wanted to do the same – so my call to action is to see what I can do to help you in this ;-).

Stay tuned for more! If you will be at “Days Of Knowledge” in two weeks – I will be talking about both topics in my session “development methodologies for the future”.

 

Thanks again for once again an outstanding edition of Directions US! – Always a blast to meet everyone!

Microsoft Dynamics 365 Business Central Spring update changed “some” field lengths

$
0
0

For long, we (as a partner community) have been asking for longer field lengths. And this time, Microsoft seems to have delivered: about 860 field lengths were changed. Mostly from Text50 to Text100, but also from Text30 to Text50 and so on. For your convenience, I created a csv on my “CALAnalysis”-repo on github that lists all of them.

Caveats

With this change, there are some caveats that I can think of – and there might be even more then I list here below.

First of all: what if a Business Central database contains C/AL customizations or AL extensions or apps on AppSource? If a database is being upgraded to the Spring Release, and in your code, you assign the field that is now Text100 to some other field in your solution that is probably still just Text50 – there is a danger for an overflow, which (I think) is a runtime error.

In case of extensions, in theory, code analysis should catch this. You should get “overflow” warnings when you compile your code against symbols from BC version 14. For an app on AppSource, ISVs should already have caught it this way in their build against the “next version” (insider) – if they had set that up of course.

For “Per Tenant Extensions”, you typically don’t set that up, so I’d strongly advise to start checking all these extensions, as unexpected errors might happen once people start using these lengths.. . I only can imagine what kind of situations that would cause – it could turn into a support-nightmare.. .

For customizations (I mean ANY solutions that are still in C/AL), you are quite “bleeped” (sorry for my French). Because we don’t have code analysis there -no way any compiler is going to help us. So if you upgrade your C/AL to the spring release, I’d highly advise you that you really take this into account. I will suggest a few ways to handle this going further in this blogpost.. .

Another caveat I can think of is reports. All of a sudden an item description can be 100 characters. I don’t know any report that fits 100 chars as a description – or I am missing something. And do realize, we are talking about 860 fields here, not “just” the Item Description. So potentially any kind of text-field on a report can run into not being fully displayed.. . Don’t know about you, but I know my customers will not appreciate this.

What can you do?

Code Analysis

The most obvious thing to do is compile your code against the latest release. With this, for any kind of extension, and especially the ones that are on Business Central SaaS (since this will get upgraded automatically), you should set up a scheduled build against the “next release”. You can easily do that with DevOps in combination with Docker. And in these cases, it’s highly valuable, as you would catch many of these possible overflows like that.

Though, I don’t know about TRANSFERFIELDS and may be other statements that assigns values to variables. Please pay enough attention to this.

The way to solve this is to also change the field lengths of your fields. Not by cropping any values and losing data in the tables where it would end up obviously.

Roll Back Microsoft’s changes

This probably sounds like the most ridiculous option your can do. I mean: change 860 field lengths back to their original lengths? Are you kidding me? Well, first of all, in my opinion, it’s a valid option for OnPrem C/AL solutions (obviously not for any kind of extension/app solution). It’s actually what we did – at least as a temporary way to go. The reason is twofold: first of all, this is our last C/AL release of our product. Next release will be full-extension. If we would do any migration to our new solution, then there is no problem. Second reason: this was the only way we could 100% identify all the changes we needed to do to make the whole solution stable again (frankly, we weren’t waiting for bigger lengths). Because after quite some attempts, there was no way for us to identify where we assign these changed fields, and where it would eventually end up in any kind of custom fields that might cause a problem.

May be a third reason of the two I was going to mention is: We could automate this.

This is the simple script that we used to roll back these changes (my colleague created this one, which was twice as fast as my version ;-)): https://github.com/waldo1001/Waldo.Model.Tools/blob/master/ChangeObjects/RestoreFieldLengths.ps1

Change all Text-datatypes to Text100

If we can do the above, we would also be able to identify all Text-fields with a length lower than 100 – and we would be able to change them to 100, right? It’s actually fairly easy to do, but in my opinion, not 100% safe (as some Text-fields were changed to 260 or even 2048).  And obviously, it wouldn’t solve the report-problem … .

So we didn’t go for this option, and I can’t get you the script, but at least you have the building blocks to do it ;-).

How did I analyze this?

Well, as you might have read, I used this code analysis tool that we created internally (and blogged about in this post). The script to compare the fieldlengths and list the differences in datatype, you can find on my github here: https://github.com/waldo1001/Waldo.Model.Tools/blob/master/Analyze/CompareFieldLengths.ps1 .

So – we survived the snap – hope you will as well ;-).

DevOps for AL – ALOps is ALive!

$
0
0

Yes! I did it! I finally managed to created the blogpost that I have been wanting to put online for quite some time. I have been putting off a lot of other posts – just to be able to make this one happen asap!

You might remember the post about Directions US 2019 – that I had some work to do. Well – let’s just say I’m trying to deliver on that promise – at least for 50% for now ;-). Namely, on – what I think – the most important part:

DevOps

Indeed! In my opinion, everybody of us (and I really mean everybody!) will – at one point in time – have to start organizing on how to develop in team. And not only that. Moving into SaaS, your customers will have more demands, like “upgrading”: everyone will get a new version of Business Central – you better make sure that all your developments (Apps AND PerTenantExtensions) are ready for the next release at all times. This means, you’ll have to compile, test, publish, .. all your apps, in combination with a multitude on localizations, every single day … for all your solutions and customers.

Yeah, I know – build pipelines, right?

Exactly. And a lot more, but to solve the “let’s be prepared for the future” kind of thing, and “let’s try to work in team” – build and release-pipelines are there for you to help. Even more: in my opinion, they are indispensable to do anything with AL Development.

Ok, but where is ALOps going to help us?

Well, I noticed that most of us understand the concept of build pipelines, and even agree with the fact that it’s absolutely necessary for moving to SaaS (development, maintenance, …) – and even OnPrem! But .. we are AL developers, and C/AL Developers, and we’re good at it! But setting up DevOps is a lot of infrastructure, a lot of PowerShell, .. a lot of stuff we are not using in our daily life. Let alone to “maintain” in our daily life. That’s why so many people came up to me to ask “can I use yours” after my session at Directions.

And THAT is exactly where ALOps will be able to help you: without having too much knowledge of infrastructure, PowerShell, Build Pipelines, … you will still be able to set up one or multiple pipelines in no time!

ALOps Extension

ALOps is a Azure DevOps extension that works on Azure DevOps online, but also on DevOps OnPrem. You can find it in the marketplace here: https://marketplace.visualstudio.com/items?itemName=Hodor.hodor-alops.

You will have to download this to your DevOps to get the build pipelines running. Now, you will have easy access to new tasks while setting up your build pipeline. You can find a more detailed description on how to get ALOps in your DevOps here.

ALOps – How does it work

We are working hard on documentation. There is even a script that creates the documentation for us, straight from the tasks-manifests of the extension – during the build of our extension ;-). That kind of like means that all the important documentation of all steps is always up-to-date. Great! Let me walk you through all the information we have

The marketplace

Url: https://marketplace.visualstudio.com/items?itemName=Hodor.hodor-alops

This is where it all starts. Here you download the DevOps extension to your DevOps environment. And all important steps are documented right on this page. It can’t get any easier than this.

These “Tasks” are actually the building blocks of a build pipeline, specifically for AL Development.

But … don’t worry … we will help you even more with building a pipeline.

Templates

URL: https://dev.azure.com/HodorNV/ALOps%20Templates/

We will do that with templates. We will have template projects for you in the public project above. Just navigate to the repos, and all repos in this project will be a certain template, containing all that is needed for an AL app, including:

  • Recommended settings
  • Bases folder structure
  • App.json
  • Recommended .gitignore
  • A build pipeline

We aim for this build pipeline to be as runnable as at all possible. So, if you would fork or clone or import from this project, you already have a running build with a minimum of effort.

A short description on how to do this, you can find here.

Documentation and feedback on GitHub

URL: https://github.com/HodorNV/ALOps

We try to document the most important things of ALOps on Github, where we also gather feedback. The repo on github is actually just a set of .md-files, which documents ALOps. It’s quite limited now, but we’ll extend this during the lifecycle of ALOps, obviously ;-).

An important part if obviously your feedback. Anyone who has questions, or has feedback or anything – just use the “Issues”-section of the repo and we’ll react as fast as possible ;-).

Examples

Another thing to help you to get started is my repos – I have set up two public projects for you to browse through, and get ideas:

  • WaldoGitHubBuilds: with build pipelines for my own github repos. At this point, just one: I’m building the waldo.nav.pad (from github) on my devops here.
  • WaldoDevOpsDemos: just some DevOps repos, different scenarios, like
    • Side-by-side (importing a fob)
    • Dependend apps
    • Just a base app
    • Multiple apps in one repo (like Freddy does it)

More scenarios will be online at some time in the (near) future.

Price

There is a big portion of ALOps that is free: simply said: it’s free for the community, but it’s not free for all projects that are for business.

What does that mean? ALOps is free for Open Source projects and any public projects! So, all MVPs and other community contributors that have an Open Source AL solution (like myself) – go get busy and build away!

For anything that is private (which I assume are trying to make a profit), there is a price. More information about that on the marketplace!

That’s also why I’m not ashamed at all to advertise for it .. I know that a lot of you will be able to use it for your own public, community stuff, like I do  – and that means it can benefit the community a lot, like it has been benefitting myself, and also our company A LOT.

Hope you like it! I’m not going to blog about every single details, but I will be working on making your life with ALOps as easy as at all possible – I promise ;-).

Enjoy!

CRS AL Language Extension – ControlNames are no longer surrounded by double quotes

$
0
0

There is a recent change that I had to introduce in the CRS AL Language Extension– you know, that tiny little VSCode Extension that quite a lot of you seem to be using ;-). +89000 downloads/+21500 installs – that’s crazy! It’s one of my biggest projects I ever did for the community :-).

Stop bragging, get to the point…

Well – because of the fact that so many people are using the extension, I think I have to make you aware of an important change (fix) I did to the extension (already almost 3 weeks ago…).

I have had a couple of requests to change the “rename” behaviour, which I had to implement, because they were causing small inconveniences. These were the requests:

Long story short: because I simply put double quotes for fields on pages, I introduced some bugs. It didn’t work for procedure calls – and it might have ended up with crashing reports.

A combination of commits (from both me and Kenneth (thanks Kenneth!)) will now make sure that the double quotes will only be there if needs to be. Much better of course, and it solves the bugs.

But that’s just like any other bugfix … so now comes the real reason of this post …

However, since you all will get this new version of this VSCode extension by default, you might have noticed that your names in your existing pages might automatically get more edits that you might have expected: when you rename the file (and for many people, that automatically happens when you save the file), it will “correct” all these fields. So you will have edits that removed quotes.

You might have had this:

And suddenly now you have this:

That might be inconvenient – I have had the feedback from a few people.

Well, it IS inconvenient – the issue is: you are making many more changes than you actually intend to. All these changes go into source control: so a changeset might give you non-important renames of controls .. which can be confusing.

How do you handle it?

Well, my recommendation would be.

  • rename all
  • commit with comment “Remove unnecessary double quotes for fieldnames”

In that case, you have one isolated commit with all the rename-changes, and you won’t have any upcoming weird changes in any upcoming commit.

Hope this helps! Enjoy the extension going forward!


AL Extension Pack for VSCode

$
0
0

I totally forgot to blog about this – so let me quickly catch up with this one.. :-).

Some time ago, after explaining my most used VSCode Extensions for AL Development for (about) the 829th time – I decided to make my life a bit easier. I already came across the concept of creating a VSCode Extension that act like packages that automatically install other extensions.  An “Extension Pack”, if you will ;-).

So … here is the …

AL Extension Pack

You can find it here: https://marketplace.visualstudio.com/items?itemName=waldo.al-extension-pack

And obviously, you can also download it from within VSCode

What does it do?

Well, if you install the AL Extension Pack in VSCode, it will simply automagically install all these extensions as well:

  • CRS AL Language Extension
  • AL Variable Helper
  • AL Code Outline
  • AL Object Designer
  • Create GUID
  • vscode-icons
  • AL Language
  • Bracket Pair Colorizer 2
  • Docker Explorer
  • GitLens
  • Git History
  • PowerShell
  • snippet-creator
  • Rest Client
  • TODO Highlight
  • TODO Tree

These are the extensions that I think are indispensable to decently develop for Microsoft Dynamics 365 Business Central. Even more, if you install the “AL Extension Pack”, you will automatically get new extensions that I would include in the pack.

So … If you have ANY …

Feedback

Please, do not hesitate to provide it in the issues-section of the github repository of this extension here: https://github.com/waldo1001/ALExtensionPack/issues. Is there anything missing? Is there a better one? Anything! Always appreciated!

Enjoy!

Features we can expect in the “2019 Release Wave 2” for Microsoft Dynamics 365 Business Central

$
0
0

A week ago, Microsoft came with this message on twitter:

Which basically pointed to an URL that was (for me) difficult to find on Microsoft Docs. I literally had to find the tweet again to find the list of expected features again .. so I figured: If I have a problem finding it, others might have problems as well. So, here it is:

The (updated) list of features we can expect in the 2019 Release Wave 2

Key dates for the 2019 release wave 2 of Dynamics 365

When I just scheduled this blog, Eva Dupont tweeted this:

I guess it’s very much “on topic”, so let’s include this URL as well:

Key dates for the 2019 release wave 2 of Dynamics 365

Look out for August 2nd to get your hands on the preview, and obviously to October 1st for the RTM release!  Following the link, you will be able to download a PDF (in your own language) with a description of all upcoming features.

What am I looking forward to?

Since we’re at it, let’s talk about the ones that I am really looking forward to myself :-).

Basically, anything “client” related is in my opinion very important, just because we know that in this next major release, the Windows Client won’t exist anymore. So:

  • Longer timeout period for server connection: this is a no-brainer. It was only added quite late to the list, but good to know that the “session timeout period” for BC Online will increase to “hours” in stead of just 20 minutes.
  • Multi-tasking across multiple pages: I know many users have been asking for this – not me in particular, but who am I? I spend more days in outlook and VSCode than in the actual client ;-).
  • Speed and agility of data entry: We have a customer we will be upgrading to BC15 (that’s what I call it), and speed of data-entry is going to be very important for them .. .
  • Customize a user profile without writing code: also again something I hear a lot from our consultants – something we need to be able to do! I just hope Microsoft will implement this on “personalization”-level, and not on “designer”-level, where we would need to compile it in code / or an extension needs to be created/changed/deployed. Users need to be able to do this on their own – and it should not involve anything technical.
  • Saving and personalizing list views: this is a no-brainer as well. So useful!
  • Add links to your navigation menu: Do I need to say more?
  • Resize columns with fewer clicks: at this point it’s not really intuitive (open personalization, and start resizing columns). So any improvement in this area is always appreciated!
  • Full keyboard shortcut support: THE number one for all I am concerned. I’m all into shortcuts, and powerusers (if I can call ‘m that) apparently as well. So I’m really looking forward to August, when this will be in the preview releases!

All great additions, and a awesome step towards getting into parity with the windows client. Probably people will still have their doubts – but that’s ok ;).

Not only the client-related stuff I’m looking forward to – also technical stuff, like:

What am I NOT waiting for?

And may be a list of what I wasn’t really waiting for  (since lately , I’m all into testability: you always have to test the opposite truth as well to have a full test – well, in this case, to have a full story, I have to talk about the opposite as well ;-))

  • More power to developers using Designer: personally, I’m not a fan of the Designer. It has brought lots of confusion (and crashes) .. but I’ll give it a go in August to see what it will bring.
  • Page background tasks: A first step into async processes .. . To be honest, I don’t see “it” yet. I need usecases .. . I missed a webcast about it – so probably it’s just me (and a matter of time) ;-). (Sorry, Kenny ;-)).
  • Base application delivered as AL applications: if that is still a surprise, well, read this post. I’m actually quite against the “Customizing-the-Base-App-in-AL” as any form of solution. For me, it’s a 100% no-go, and I will do anything I can to go fully for AL Extensions. And after all the investments we have been doing, I’m confident we will succeed. Why am I against it? Well, in my opinion, it’s at least as bad as going hybrid (aka “side-by-side”. You can read all about my opinion on that here). With all the changes we have been going through – and we are still going through – I don’t see why we would have to implement even a third development model as a partner.
    I know some people see it as a step in the AL direction. Well, it IS a step, sure .. but the only direction I can think of is “South” ;-). It feels too much like putting off the inevitable to me .. . And yes, I realize that some things are not possible with extensions, like extending primary keys, reports, options, posting routines, .. or missing events. We also had to deal with all of these … .
    Anyway, I’m at it again – I told myself to shut up about this very topic… , but apparently it’s stronger than me ;-). I’ll stop here…

So here you go. To recapitulate, the main topic of this post is simply to share the URL to the list of features: The (updated) list of features we can expect in the 2019 Release Wave 2! But now at least you have some useless opinions on top of it ;-).

AL BaseApp Customization: “because you can doesn’t mean you should”

$
0
0

Sometimes I get the remark that I’m not sceptical enough, but mostly too positive towards whatever Microsoft does … well – I have been very happy with the product, the progress, the evolution and the revolution.

For all of you with that opinion about me – let me make you happy.  You might have figured from my previous post that there is one topic that doesn’t make me particularly happy: “Code Customizing the AL BaseApp”. The one thing I’m very opposed against – even more than dreadful properties like “ApplicationArea” and “ShowMandatory” ;-). “Code Customizing the AL BaseApp” is an ability for partners that Microsoft is working on – you can read more here in a recent blogpost from Freddy.

Let me try to explain …

Since NAV2016, we have seen a move to a new development model: extensions: an ability for us to change the product, without having a footprint in the base app. This comes with many advantages, like upgradability and maintainability. Whoever has been doing upgrades the classic way knows that this is not easy. Extensions gives us the possibility to create and change the software, and still being able to implement “continuous upgradability”. Theoretically, at least ;-). Now, about 3 years later, we even have a new development language (AL) that fully implements that development model (extensions).

However – the new development model implements limitations we are not used to: we were able to change whatever we want, and with extensions, we are only able to extend what Microsoft allows us to extend. The more time passes, the more limitations will disappear, but .. time has to pass, I guess.

Very recent, Microsoft has released what to expect in “2019 Release Wave 2” (which I blogged about, indeed). A big part of it is the ability to customize BaseApp code in AL. In short: in this new fancy development environment (VSCode), we won’t only be able to create and maintain Extensions, but also customizations to the base app. Basically: we will be able to do whatever we have been doing for so many years.

Is this a step forward? May be because of the new fancy development environment? Well – I beg to differ…

Why is Microsoft doing this?

For partners.  Microsoft listens to feedback of partners, who convinced Microsoft that there are solutions out there that have been implementing such customizations, that are not (yet?) portable to the new extension-model. And while Microsoft wants to abandon C/SIDE completely in the next release, the only thing they could do is to allow a way to do code customization of the BaseApp in AL.

Can you give me examples?

Well, I mainly hear 3 types of customizations that appear to cause the inability to move completely to extensions (probably there are more…).

  • .Net / Client-side resources / …: Custom made dll’s, like reading scales, direct access to SQL Server, ftp, … these kind of fancy things.
  • Extending options (enums): like adding a document type, or another line type in a sales document
  • Changing Primary keys

If you want to get rid of these, you’ll have to refactor your solution that way you don’t need them anymore. But, with the ability to “code customize the BaseApp in AL”, now you have the choice to NOT refactor, and just take what you did, and migrate that to AL.

What did you do?

Well, in our company, we refactored (and are still refactoring). Our company had to address all of these examples to be able to move to extensions as well. We even take the advise from Microsoft very literally: In the future, on-premises will follow the cloud rules. Basically meaning: apply all the rules like it would run as PerTenantExtension or AppSource – even when you are OnPremise: No .Net, only extensions, … .

Disclaimer: I don’t want to claim we had to face all the challenges out there – I’m just stating we had challenges, and I am very happy we are still able to find solutions to “stick to the rules”, although, many times, a lot of creativity is involved … :-/.

Postponing has consequences

You will be cheaper – and that’s not always a good thing

In my opinion, the ability to customize the AL BaseApp gives the partner the opportunity to NOT take the opportunity to move to extensions. It gives them a (fairly) easy way out. It gives them even a (temporary) competitive advantage against partners that are not taking the easy road, but the less easy (but more future proof) one. Just think of it: if two partners try to help a customer: one will give a quote on migrating him to a code customized but not barely upgradable solution, the other quotes a rewrite and rebuild into extensions … .

Microsoft WANTS us to move to Extensions

And, don’t forget: Microsoft wants us to move to Extensions. Yes, I did mention that twice .. ;-).
Like I will say this again as well: In the future, on-premises will follow the cloud rules“.

Postponing doesn’t mean avoiding …

IF you are moving to code customized AL, you are postponing the inevitable. And in my opinion, that comes with an extra price: the price you pay to implement that code customized AL solution.

Just think of it:

  • Do you really think your custom dll will ever be allowed in the cloud? You might have to redefine that solution at some point anyway (like service-oriented architecture)?
  • Do you really think they will ever allow to change primary keys? I at least hope not – or I’m not going to trust any app together with mine ;-). Again, you’ll have to do it at some point anyway.. .
  • Do you really think that Microsoft will implement the ability to change the options of the BaseApp any time soon? And I’m serious here … . I do believe that enums are great. But extensible enums – you have to foresee that in code and make the code extensible as well on every single place the option (sorry, enum) has been used.. . I don’t see this happening any time soon for baseapp options, to be honest. It’s a huge works, and it breaks a lot. There are other design considerations, like we simply introduced a new boolean (basically .. some more to it though ;-))

Postponing doesn’t make your life easier

I mentioned “upgrading” a few times. I don’t know about you, but we are quite well-organized in terms of upgrading at this point. At least for C/AL. How does it look like in AL? Well, you won’t have the AMU (Application Merge utilities in PowerShell) anymore. So when you would code-customize the BaseApp in AL, you’ll have to rely on DevOps, I’m afraid. I don’t know how it would look in DevOps, to be honest. But I don’t want to figure that out either. I’m done with upgrades. Really. Shouldn’t we invest the time to see how we can refactor, rather than finding yet another way to manage upgrades for our customers? And keep in mind that Microsoft is planning to work on the BaseApp as well – which will not make your upgrades harder than any upgrade before – with different tools … . Sorry, I don’t see this as a step forward ..

Support

For me, this “code customizing AL” is just another development model, similar to the “hybrid” model. And if you don’t know how I feel about hybrid models – just read this  (looks like I did my share of ranting lately ;-)).

Our lives are difficult enough. And if you are not careful, you might end up with having to support:

  • Some customers purely in C/AL (well, that’s what we have been doing for so long already .. )
  • Some customers purely in AL (with extensions, with dependencies, CI/CD most likely, testability, … )
  • Some customers with a product and customizations in C/AL, but some ISV product on AL extensions (do you feel it coming..?-
  • Some customers with a product in AL, but customizations in C/AL, just because I wanted to change a primary key
  • Some customers with a product in AL, customizations in AL, but code customized .. So not “just” extensions.

You feel me? You really think your support-team is going to like this mixture? It would only be a good thing if you hate your support-team ;-). No, seriously, I don’t see how I could make anyone happy internally with this kind of operations.. .  Try to explain them how to deploy the C/AL part of an implementation, or how to upgrade the dependent app that is dependent from a code customized database, or how to debug/update/deploy/ … in those different types of implementations, … .  We already have all these version of NAV to know, are we really going to implement different development models as well?  

It is also good to have the BaseApp code in AL though …

To end with a positive note – we have the code in AL! And I love that. It’s so much easier to find stuff with VSCode. You can search symbols, search text, file names, … I love it! So, for LOOKING at the code, I love it!

Conclusion

I’m going to end this post here – I have the feeling i have been repeating myself too much already … and I might already have offended some people … if so, sorry, that’s really not my intention.  I write this to share my concerns, that’s all.  If you have a good reason to go down that route .. than go down that route!  Please, by all means, do what you think helps you best!  The only thing I try to do here is to make you think twice before you do ;-).

May be the only thing that I wanted to say is: “because you can doesn’t mean you should” ;-).

App Dependency Tree – import your apps in the right order (with PowerShell)

$
0
0

Recently, I got the question on how to get a dependency tree from a bunch of Microsoft Dynamics 365 Business Central apps. In other words – how do I know in which order I have to import my apps to respect the dependencies.

Well, I didn’t have a ready-made script available. I only had a script my colleague provided me – so I took that as a starting point, and spent an evening in trying to put something together – as it IS a very interesting question ;-).

To be honest, we don’t need this in our company in our build pipeline, nor in our release pipeline. Nevertheless – I have heard the question multiple times, so Let’s .. Get .. Started .. ;-).

PowerShell

It’s obvious we will use PowerShell for this, as that’s what you will use to publish apps in an environment. You use it in build pipelines, in release pipelines, and even when you would just import in a one-off sandbox.

In PowerShell, we also have the CmdLets that Microsoft provides to manage our environment.

So .. Let’s start by linking the script, which you can find on my GitHub here: https://github.com/waldo1001/Cloud.Ready.Software.PowerShell/blob/master/PSScripts/NAV%20Extensions%20v2/GetDependencies.ps1

(I’m just providing a link, as when the script would change, you would alway see the up-to-date version of the script).

Some brief explanation

The script assumes you have a bunch of app-files somewhere. In this case, on the “c:\programData\NavContainerHelper” folder, because I’m using docker in order to run Business Central PowerShell CmdLets. You see I’m using the “Get-NAVAppInfo” cmdlet to get information about my apps. This information includes dependencies – which I will obviously need for my script. I then create my own collection of apps in PowerShell to be able to loop and do my thing.

The function AddToDependencyTree is a recursive function (wow – I didn’t use recursive functions for ages :-/) where all the “magic” happens. By looping the apps in my collection, I will always respect the dependencies by recursively drilling down into the dependency tree, and handle the lower-leveled apps by adding (or modifying) them with a lower “order” in the result-array (the DependencyArray variable).. . When completely looped, I have a new array including a decent “ProcessOrder” property in my collection.

On the bottom of the script, you see the actual loop, where I loop all the apps, and add them to the dependency tree.

Test

To make it somewhat easier for me, and to simulate a somewhat complex dependency tree, I created this script:

https://github.com/waldo1001/Cloud.Ready.Software.PowerShell/blob/master/PSScripts/NAV%20Extensions%20v2/GetDependencies.ps1

It would replace the “Get-NAVAppInfo” looping through files, as it will build a “$AllApps” variable to be able to loop through.  Just a tip ;-).

Disclaimer

I did briefly look online if I could find any blogpost that already handled it – but only briefly. If I missed a solution (which is probably better than this one) – I apologize. There are so many contributors lately, it’s hard to keep track, catch up, … you know what I mean ;-). So, if you have a better (or worse ;-)) solution, don’t hesitate to mention that in the comment section.

Enjoy!

Business Central Modern Client: Remove the designer button

$
0
0

You all know the designer, right? The tool for developers (aka the “in-client visual designer”) that “provides an easy and convenient way of making immediate adjustments to your design by simply dragging and dropping the components on the page”.

Well .. then you probably know there are things to take into account… 

Issues

It actually all comes down to what I call “the worst button in NAV ever created in history of mankind”. The “Design” button:

Whoever uses that button, is actually doomed in any kind of scenario. What happens is: you open design mode without any context of “active extension” – which basically means – it will create a new extension. And if you – after designing – save that extension, another invocation of the button will create yet another extension. Extensions after extension .. and your environment gets messier and messier.

Ok – I admit – it would just be a sandbox database (in SaaS, this button is only enabled when you opened a sandbox (but what about OnPrem??)) but still, I don’t see any use case to use this designer other than you would design pages for YOUR extension, meaning you would open the Designer from VSCode by “AL: Publish and open in the designer” (or “F6” if you will):

When you would do that, you ARE actually giving a context to the Designer (being your currently published extension), which means it will save all the changes you would do, into that extension for you to be able to download to your extension again (with F7 (Download Source code)).

Remove the button of evil

So, the Designer is good – the button is “evil” (yeah, probably exaggerated a bit, but you get my point ;-)). Now, on SaaS, you don’t have to worry that much. OnPrem, my recommendation would be that you actively make sure, this button does NOT exist in a live environment.

When I was searching for how to do this, the only thing that I could find was this on Docs:

Now, I knew of the fact we could also hide the “Personalize” button (which is on the same place in the client) by simply edit the navsettings.json. There is actually a very helpful page on Docs that explains what you can configure for your web client: https://docs.microsoft.com/pt-pt/dynamics365/business-central/dev-itpro/administration/configure-web-server . And while I expected the same kind of setting as this personalization, this document doesn’t say anything about how to hide the designer, or any kind of setting in that same file, that handles visibility of that button.

Luckily, I have smart colleagues, who found out that there actually IS as setting, in that navsettings.json, that actually handles this:

One thing though:

PowerShell

By editing the file directly, it would work, but only after some services that would have been restarted (I restarted the entire docker container). But if you would use PowerShell like this: 

Set-NAVWebServerInstanceConfiguration -WebServerInstance NAV -KeyName Designer -KeyValue false

It works instantaneously

Do know though, when you decide to remove this, you can’t open the designer from VSCode either.. .

Microsoft Dynamics 365 Business Central 2019 release Wave 2: Full keyboard shortcut support

$
0
0

Now Wave2 blogging is allowed, there are many topics that I want to share with you .. really, a lot. Time is not on my side – I’m in full preparation for Directions and NAVTechDays, so let’s see.

Today, while working on my SaaS-deployment-pipeline in DevOps with ALOps, I DID find the time to say a few words on one of the topics I’m quite excited about: Shortcutkeys in the webclient, or in other words: full keyboard shortcut support!

In my “real world”, users (yes, I do have customers, although people sometimes seem to be thinking otherwise.. ) have been asking this for quite some time .. and finally I can tell them: it works like it should!

Obviously you already knew about this, because I already announced it here (and specifically here by Microsoft) – just kidding ;-).

How it works?

Very simple: you have a “ShortCutKey” property on action, where you can set the ShortCutKey like this example:

I guess that doesn’t need too much of explanation, does it ;-)? You can simply do it the same for your actions. And I can tell you: it works! :-).

Knowing this, let’s dive a bit into what Microsoft did…

Did Microsoft apply it to the Base Application?

Absolutely. Even more, at the current version (a bit depending on localization), I found 1370 places where Microsoft added a ShortCut! I can only imagine they were able to convert that from the Base Application ;-).

This made me think though – are there THAT many shortcuts we need to start learning by heart?

I decided to dive a little bit more into it, by analysing all the shortcuts by creating a PowerShell script that loops all al files of the Base Application, and lists all ShortCutKey properties in a csv file. You can find the script here: https://github.com/waldo1001/blog.CALAnalysis/blob/master/ShortCutKeys/GetShortCutKeys.ps1

You can find the output in that same repo, but here is the overview of all shortcuts that I found are implemented:

ShortCutKey

# of Actions

Explanation

Alt+D

356

Dimensions

Ctrl+Delete

1

Delete

Remark: this is only applied on PageItemAvailabilitybyTimeline

Ctrl+F11

17

Reconcile

SplitWhseActivityLine

Ctrl+F7

183

Navigate to “Entries”

Ctrl+F9

43

“Finish”

“Release”

“Release to Ship”

Approve

Release

UnappliedEntries

Ctrl+Right

2

Post

Only on (BC)O365SalesInvoice Page

F7

154

Statistics

F9

101

Post

Return

93

Open

This is an interesting one …

Shift+Ctrl+D

4

Dimensions

Only on these journals:

    • FinancialJournal
    • EBPaymentJournal
    • DomiciliationJournal
  • ApplyGeneralLedgerEntries

Shift+Ctrl+F

1

SuggestWorksheetLines on CashFlowWorksheet

Shift+Ctrl+F9

1

“Post and Print Put-away” on WarehouseReceipt

Shift+Ctrl+I

92

Item & Tracking Lines

Shift+Ctrl+L

2

Run (All) on Test Suite

Shift+F11

24

Apply Entries

Shift+F7

228

Card / Show Document (why not “Enter”? :-))

Shift+F9

68

Post & Print

As you see, not really THAT many, but very useful nevertheless..

Now obviously the next question:

Can we change a ShortCutKey from within an app?

And yes you can! So, if Microsoft has forgotten any, you can add them! Here is an example:

As you can see, in this case, I didn’t just add a ShortCutKey, but I even changed the “ALT+D” to something else. And it works .. . Not sure we should all be doing this – and also not sure if everyone would do this, what would happen with conflicting shortcutkeys (although, I guess the “first of last one wins”?), but now at least, you know it’s possible!

If you want to play with Wave 2, get started here:

https://freddysblog.com/2019/07/31/preview-of-dynamics-365-business-central-2019-release-wave-2/

The “SystemId” in Microsoft Dynamics 365 Business Central 2019 release Wave 2

$
0
0

I’m returning after a very interesting workshop on DevOps in Berlin .. . At this moment, I’m wasting my time in the very “attractive” TXL airport because of my delayed flight. And how can I better waste my time than to figure out some stuff regarding Business Central.

Figuring out indeed, because I have barely internet, a crappy seat, nearly no access to food, … so for me this is a matter of bury myself so I don’t have to pay attention to my surroundings ;-). Anyway .. It’s not all that bad .. but a delayed flight is never nice. Anyway…..

opic of today: the new systemId!

While I was converting our app to be able to publish on the Wave 2 release .. this was something that I noticed:

All the “integration id’s” are marked for removal, and – most interesting – will be replaced by “the systemID”. What is that? Google, Microsoft Docs .. none of my conventional resources helped me finding out what SystemID is .. luckily, I did come across some information on yammer by Microsoft ;-)..

RecordIDs

You probably all know RecordIDs, right? A single “value” that referred to a specific record in a specific table. We all used them in generic scenarios, right? Also Microsoft – I don’t know if you know “Record Links”? A system table that stores notes and links to specific records? Well, the link to the record is made through RecordID. We have been using it for years .. . Now, a big downside of using RecordIds was the fact when you would rename the record (one of the fields of the keys), it would change its RecordId as well .. and all of a sudden, you could lose the connection in all tables where you stored that specific ID. Long story short – not ideal for integration or generic scenarios…

Surrogate Keys

And this is where “surrogate keys” of my good friend Soren Klemmensen came into place. He came up with a design pattern (well, I don’t know if he came up with it – but he sure advocated it for a long time) that described how to implement having a dedicated unique key of one field for a record. Basically: add a field in a table, and make sure it has a unique GUID. Make it that all these surrogate keys have the same FieldNo, and you are able to generically access the value of any of the keys for any record.

This is something Microsoft actually implemented themselves. And the code is all over the place. Even still in Wave2, we have the code to fill the “Integration Ids” as they call it. Nice system, but a lot of plumbing needed to make it work. I don’t know if there was a design pattern that described what you needed to do to apply this on your own tables – I never did ;-). But definitely interesting to do for many scenarios. Thing is .. quite a lot of work.

The SystemID

Now, as you got for the first screenshot: Microsoft is abandoning this field 8000 (that so-called “integration id”) – their first implementation of the surrogate keys – and will implement “SystemId” from the platform. Meaning: whatever you do: you will ALWAYS have a key called “systemId” for your table, which is a unique GUID in that table that can identify your record, and will never be changed – even when you would rename your record.

How cool is that! Here is an example of a totally useless table I created to show you that I have the systemId in intellisense:

What can we expect from the systemId?

Well, in my understanding – and quite literally what I got from Microsoft (thanks, Nikola  ):

  • It exists on every record
  • But not on virtual/system tables (not yet, at least)
  • You can even set it in rare scenarios where you want to have the same value (e.g. copy from one table to another, upgrade…). Simply assign System Id to the record and do Insert(true,true) – 2x true
  • There is a new keyword – GetBySystemId to fetch by system id
  • It is unique per table, not per DB. Customers and items may have same IDs, though is hard if you are not manipulating it yourself, since guids are unique. Let’s say, they are “probably” unique  – but on SQL, there is a unique key defined on the field, so only guaranteed per table.
  • Integration Record is still there, however the Id of the Integration Record matches the SystemId of the main record (Microsoft has code and upgrade in place)
  • You can only have simple APIs on it (no nesting, like lines). At this point, at least. It should be fixed soon, which is why the APIs are not refactored yet to use SystemId instead of Id.

A few more remarks

IF you would create a field that refers to a systemId, then it makes sense to use the DataClassification “SystemMetadata” for it. Not because I say .. just but because I noticed Microsoft does ;-).

Another not unimportant something I noticed: this is a system-generated field. So if you would need the fieldnumber, you have “recref.SystemIdNo”:

My take on it

From what I understood: there is work to do, but things are looking good:-). In fact, it is exactly what we have been asking for – and Microsoft delivers. Again! Great! I know this will see a lot of use in the (near) future! Within the Base Application, and in lots of apps.

Do know, I didn’t have any documentation about this – so all is based on some small piece of remark on yammer, and things I could see in code… So – if you have anything to add – please don’t hold back ;-). That’s why I have a comment section ;-).


New logo for Microsoft Dynamics 365 Business Central

$
0
0

Small message that I just needed to share :-).  As said – I’m prepping my sessions for Directions, which basically means: I’m spending all my free time in “Business Central” these days.  No printing, hardly any social contacts … . 

And while publishing to SaaS, I noticed this when I refreshed my page:

That’s right!  A new logo, people!  (I should say “Icon” actually, but you know what I mean).  Let’s have a closer look:

Doesn’t look bad! Not bad at all .. But it does mean I’ll have to redesign my 3D printed logo ;-).  And I will … I so will .. .  As I said on twitter earlier today: I’m so distracted now that I have to first make sure that I started a new print with a new concept before I can continue prepping my sessions :-).

Microsoft Dynamics 365 Business Central 2019 release Wave 2 is released!

$
0
0

Sorry for the shortness of this blog (may be you like it that way ;-)) – but just a small reminder for anybody that has been sleeping under a rock for the last couple of days:

Microsoft Dynamics 365 Business Central 2019 release Wave 2 is released!

All you need to know is simply quite well documented by Microsoft.  Let me give you a few links:

And yes, that’s right: C/AL is gone, and the RTC is gone as well!  But together with that, a lot of goodies are being thrown in our lap!  If you want to know more, read the above links, or come to Directions or NAVTechDays and learn from the very people that built it!

It’s a big one – so build pipelines will break, code needs to be upgraded.  I guess it’s time for action ;-). 

More to come ..

Insufficient stack to continue executing the program safely

$
0
0

The better half of my past week can be summarized best by this oh-so-descriptive-error-message:

Right: a message I have spent a long time on to find out what was happening – and what caused it.  Multiple days – so let me try to spare you the pain when you would encounter this error.

(tip: if you don’t care about the story, just skip to the conclusion ;-)).

History

We are rebuilding our product to Business Central – and are almost finished.  In fact, we have spent about 500 days building it – and since the recent release of Wave 2, we are fully in the process of upgrading it – because obviously, since all is extensions (we have a collection of 12 dependent extensions), that should be easy.  (think again – Wave 2 came with a lot of breaking changes… but that’s for another blogpost ;-)).

Symptoms

Our DevOps builds had been acting strange for a while – just not “very” strange .. .  In fact: when a build failed with a strange error (yep, the above one), we would just retry, and if ok, we wouldn’t care.

That was a mistake.

Since our move to Wave2 .. the majority of the builds from only 1 of the 12 apps failed – and even (what never happened before), the publish from VSCode failed as well with the same error message:

Insufficient stack to continue executing the program safely. This can happen from having too many functions on the call stack or function on the stack using too much stack space.

We are developing with a team of about 9 developers – so people started to NOT being able to build an environment, or compile and publish anymore.  Sometimes. 

Yes indeed: sometimes.  I had situations where I thought I had a fix, and after 10 builds or publishes – it started to fail again.

And in case you might wonder – the event log didn’t show anything either.  Not a single thing.  Except from the error above as well.

What didn’t help

I started to look at the latest commits we did.  But that was mainly due to the upgrade – stuff we HAD to do because of the breaking changes Microsoft introduced in Wave 2.

Since it failed at the “publish” step, one might think we had an install codeunit that freaked out.  Well, we have quite a few install-codeunits (whenever it makes sense for a certain module in that app) .. I disabled all of them – I even disabled the upgrade-codeunits.  To no avail.

Next, I started to look at the more complex modules in our app, and started to remove them .. Since one of the bigger modules had a huge job during install of the app – AND it publishes and raises events quite heavily, I was quite sure it was that module that caused the pain.  To test it, I removed that folder from VSCode, made the code compile .. and .. things started to work again.  But only shortly.  Moments later, it was clear in DevOps that certain builds started to fail because of the exact same error.  From victory .. back to the drawing board ;-).

Another thing we tried was playing with the memory on our build agents and docker hosts.  Again, to no avail .. that absolutely didn’t help one single byte.

And I tried so much more .. really.  I was so desperate that I started to take away code from our app (which we have been building for over 6 months with about 9 developers (not fulltime, don’t worry ;-)).  It’s a whole lot of code – and I don’t know if you ever tried to take away code and make the remaining code work again .. it takes time :-/.  A lot!

What did help

It took so much time, I was desperately seeking help .. and from pure frustration, I turned to Twitter.  I know .. not the best way to get help .. but afterwards, I was quite glad I did ;-).

You can find the entire thread here:

First of all: thanks so much for all of the people for their suggestions.  There were things I didn’t try yet.  There were some references to articles I didn’t find yet.  All these things gave me new inspiration (and hope) .. which was invaluable!  Translation files, recursive functions, event log, dependencies, remove all code, force sync, version numbers, …

Until phenno mentioned this:

Exactly the same error message, with a big xmlport.  It first pointed me to the wrong direction (recursive functions / xmlport) ..

But after one of our developers remembered me that from months back, we also had a big object: A 1.2Mb codeunit, auto generating all Business Central icons as data in a table, to be able to use them as icons in business logic.  Initially I didn’t think it would ever have an effect on the stability of the app (in this case – the inability to publish it) .. we wrote the damn thing more than 4 months back, for crying out loud :-/ and the code was very simple – nothing recursive, no loops, very straight forward.  Just a hellofalot of code ;-).  But .. It doesn’t hurt to try what it would do when I would remove the code .. so I tried .. and it works now!  Victory!

Conclusion

The size of a file (or object) does matter.  If you have the error above – it makes sense to list your biggest files, and see if you can make them smaller by splitting the objects in multiple (if possible.. ). 

While in our case, it was one huge object in one file.  And I don’t know what exactly was the problem: the size of the file, or the size of the object.  There is a difference.  If I wanted to have kept the functionality, I might have had to split the object in multiple codeunits, and on top of that I might have had to split them in multiple files (which – in my honest opinion – is best practice anyway..).

Also, I have the feeling that Wave 2, is a bit more sensitive to these kind of situations.. I don’t know.  It’s just – we had this file for quite a while already, and it’s just with the upgrade to Wave2 that it started to be a problem.

In any case – I hope I won’t wake up tomorrow, concluding the error is back and all the above was just one pile of crap.  Wish me luck ;-).

My NAVTechDays

$
0
0

I got quite a week ahead of me .. .  Not only will I host one session and some workshops .. I will actually host 2 sessions, 2 workshops and an ISV session this year.  What did I get myself into?

No repeats!

If you look at my session schedule, and you have visited Directions EMEA, well, you might wonder if I’m “just” redelivering content at NAVTechDays.  Well .. No!  Totally not, actually. Without giving away anything – let me try to explain …

Development Methodologies for the future (Thursday 11:30 – 13:00)

First of all, if you attended my session at Directions, you noticed that there, I prepared actually 3 sessions, and the audience chose the topic of that particular session.  I was lucky that all three topics that I prepared were quite equally popular while the audience was voting – so I would be stupid to do just a repeat.  No, I will actually slice a completely different topic as I did on Directions EMEA.  All new content – and more ;-).  More details Thursday at 11:30 during my session ;-).

{Connect App}² (Friday 11:00 – 12:30)

My session with Vjeko at Directions was “Connected Apps” .. .  This one is “Squared” ;-).  Which means: more!  Much more! So, If you attended that one on Directions, and you thought we took it “far” – well – think again!  Just to say, also this one is not a repeat.  How could it be?  At Directions, there were only 45 minutes ;-).

Workshops

Also this year, I will be hosting workshop during the predays, which I always look forward to.  I just hope that the internet will be good, because I will be quite dependent on it ;-).  I prepare individual Azure VMs for every attendee to make it as comfortable as at all possible .. but that means: internet! ;-).  What I will be doing is something I have been doing quite a lot …

Developing Extensions for Microsoft Dynamics 365 Business Central – Introduction (Tuesday)

For the people that are putting their first steps into AL development.

Developing Extensions for Microsoft Dynamics 365 Business Central – Advanced (Wednesday)

For the people that already have put their first steps .. but still feel they need some guidance for the “stepping” to feel comfortable (if that’s an explanation at all ;-)).

ALOps (Thursday 15:40 – 15:55)

And if that’s not enough .. I’m doing yet another session .. . This one is an ISV session for the product we have been working so hard on to get to the community: ALOps.  We are a Platinum sponsor, which comes with an ISV slot – and I’m looking forward to speak to all people that are interested in “doing decent DevOps for AL easily” ;-).  We will obviously also have a booth at the EXPO – please come by!  We have stickers ;-). And we might just get your pipeline upt and running .. during the conference ;-).

In total, that means I have about 19 hours and 15 minutes of content to deliver on NAVTechDays … .  Again .. what did I get myself into :-/.

NAVTechDays 2019 – Final thoughts

$
0
0

It’s over – the week I’m always looking forward to for so long passes by in a blink of an eye: NAVTechDays.  As Vjeko already shared the goodies– I will do so as well – joined with my final thoughts and some pictures ;-).

I feel myself old and repetitive by saying this conference is “something else”.  Just imagine: quality food: morning, noon and evening, quality (recorded) sessions – all available to the community, 90 minute deep-dive topics, in quality seats, with quality media equipment, and quality speakers (uhum ;-)) – all captured by a quality photographer.  Quality! That’s NAVTechDays: no dime is spared to provide THE BEST conference experience anyone could wish for.  From start to finish!  Unmatched on any level. This year, there was even a hairdresser, I kid you not ;-).

If you don’t believe me: here is the Photo Album of this year’s edition!  And if you think this is the only quality edition?  Well – think again – here are all albums of all editions!

All sessions are recorded, and already available on youtube and on mibuso.  If you have about 28.5 hours to spare – you can find all videos here.

My edition

As predicted, my NAVTechDays was a bit too busy.  So much content in only a week .. I have to admit – it’s simply too much.  I probably won’t do that again – and if I do – I’ll at least have this blogpost to hold onto to declare myself crazy .. again ;-).

One special thing I was really happy to be able to do: I got my parents into my session. That’s a special feeling, I can tell you that. You always try to explain what you do, and what impression it has on you – but they can only understand when they actually experienced it :-).

I can’t judge if my sessions were well received.  Thing is – I realize that the topics I talk about – the opinions I evangelized are not always the opinions that are shared by all of you.  Like “Code Customized AL” or “embracing dependencies” to just name a few. I know people that are passionately for code customizing AL – and who are passionately against any form of dependencies.. .  Well, I realize that it can have its effect on how the session is being received (like: complete bullshit ;-)).  All I can do, is share my experience, and what I believe makes sense to go forward .. and I still stand by 100% I have been advocating ;-). And yes – in the “real world”.

In any case … as said, you can find my sessions on mibuso and on youtube here:

NAV TechDays 2019 – Development Methodologies for the future

And the session with Vjeko about connect apps:

NAV TechDays 2019 – {Connect app}²

In the next weeks/months, these videos will also be turned into a series of blogposts.  I already planned a few – and Vjeko is already blogging is ass off as well .. .  Expect a lot, soon (or late – no promise ;-)).

All there’s left for me to say is: thank you!  Thank you for joining my session, thank you for joining my workshops, thank you Luc, for making this happen for all of us – it’s a real honor to be a small part of it!  Thank you, Vjeko, my bro, for sharing the stage with me :-).  Awesome week!

Picture time!

Viewing all 336 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>