Sunday, March 29, 2020

Learning Business Central Development From Scratch: FLF license files

By Steve Endow

As I mentioned in my prior post in this series, I'm starting from absolute scratch when it comes to learning Dynamics 365 Business Central development.  I'm clearly not an expert at this point, so if you find any information in the post that is inaccurate, please let me know.

I've spent months learning how to install and configure Business Central Docker containers, including the many, many quirks of that process.  I've been trying to create a blog post and video on that for months, but given all of the details I want to cover, it's very tedious to prepare and still not complete.

So in the meantime, I thought I would write about one specific detail that I learned while trying to setup a Business Central Docker container.  This post is one of those asides.

As a result of my "newness" (ignorance), I'm running into small issues that are probably obvious to any experienced NAV and Business Central developers, but cause me to stop what I'm doing and spend 15 minutes, 30 minutes, or perhaps several hours to figure out.

The Business Central FLF license file is one of those issues.  Coming from the Dynamics GP world, I know nothing about NAV or BC licenses or license files or how licensing works in BC, other than the user-based licensing for BC SaaS.

If you are going to be working with Business Central Docker containers and include automated testing (which you should!), I suspect you'll need to know about FLF license files.

NAV Container Helper - Include Test Toolkit

Above is a sample call to the NavContainer Helper PowerShell script.  Notice the parameter on the last line:  includeTestToolkit.



Here is the description of includeTestToolkit, and a related parameter, from the GitHub repo:

NAV Container Helper Parameters


It is my understanding that the includeTestToolkit is required if I want to use the Microsoft automated test tools as part of your Business Central AL development projects.  To learn more about automated testing, check out the book Automated Testing in Microsoft Dynamics 365 Business Central, by Luc van Vugt.  Luc also offers online training classes for Business Central.

I want to install the Test Toolkit when I create my BC container in Docker, so I add the "-includeTestToolkit" parameter.

Not so fast!

Your program license does not allow you to publish 'AL Test Suite'

If you try to create a new BC container with just the includeTestToolkit parameter, you'll get the error above:  Your program license does not allow you to publish 'AL Test Suite'.

Okay then.  What is a program license and how do I get one?

One clue is in the free "Programming in AL for Beginners" workbook created by Krzysztof Biolowas.  The workbook is available on GitHub.


In his sample call to NAV Container Helper, he shows the -licenseFile parameter, with a note to include a local path for a license file.

This gives me two clues.  First, it tells me I likely need to include the "licenseFile" parameter if I want to use "includeTestToolkit", and second, it tells me that the "program license" is likely contained in a file.

So how do I get a license file?

I'm a Microsoft Dynamics Partner and have access to PartnerSource.  In the Dynamics GP world, partners are able to generate demo license keys for Dynamics GP through PartnerSource, so I logged in to see if I could generate a BC license.

After stumbling around for a while, I was finally able to generate a BC 15 license file.

Generating a BC Dev License File 

Note:  If you aren't a Microsoft Dynamics partner, I don't know if you are able to obtain a BC dev license file.  I don't know if a customer license file will work, or if there are any alternatives.


The license file is a small file with an ".flf" extension.

Small, but essential

After posting this article on Twitter, Mark Brummel shared an interesting bit of trivia about the history of the "Financials License File".



Note:  The dev FLF license files generated on PartnerSource expire after 90 days.  I discovered this recently when I tried to create a new Docker container with the test toolkit, and I received this error:  Your program license has expired.

Not So Fast

Since I knew the license file worked previously, I assumed that there was an expiration date included in the license file.

After some research, I learned you can open the file in a text editor to view some plain text showing the license file contents.

FLF file contents

Besides seeing the Product Line and Version information, you can view the license file expiration date.  Unfortunately, the 90 day expiration apparently can't be adjusted.

Now, with a valid license file, we can try creating a BC container with the includeTestToolkit and licenseFile parameters.

Success!

This is what it looks like when you successfully create a container with the Test Toolkit installed.


Steve Endow is a Microsoft MVP in Los Angeles.  He works with Dynamics 365 Business Central, Power Automate, Power Apps, Azure, Dynamics GP, SQL Server, and .NET

You can also find him on Twitter and YouTube

No comments:

Post a Comment

All comments must be reviewed and approved before being published. Your comment will not appear immediately.

Why Business Central is Amazing #5: Community

 By Steve Endow The Business Central Community is amazing. Want proof?   Here's a great example from my Twitter timeline this afternoon:...