Dynamics 365 Business Central: loading Configuration Packages from AL

Today I’ve spent few times handling a (not so common I think) scenario where from an extension I need to be able to load a RapidStart package (.rapidstart file) to Dynamics 365 Business Central and apply it.

As explained in my last post, in the cloud environment we need to use Streams for handling files and today I discovered (with pleasure) that Microsoft has modified some methods in codeunit 8620 – Config. Package Import for handling Streams. This permits us to programmatically load a RapidStart package also in the Dynamics 365 Business Central cloud environment and this is the AL code for doing so (in case you need that):

LoadConfigPackageFromAL_01.jpg

We have two methods available in codeunit 8620 – Config. Package Import:

  • ImportAndApplyRapidStartPackageStream: receives a TempBlob record as input and loads and apply the package.
  • ImportRapidStartPackageStream: only loads the package passed as TempBlob argument. This function wants also a Config. Setup record (temporary) as input. To apply the package, you need to call the ApplyPackage method defined in Config. Setup table.

I have only a question: I was not able to load multiple .rapidstart packages in a single step! šŸ˜¦

The solution for this problem could be (alternatively):

  1. Microsoft will add a new methodĀ ImportRapidStartPackageZIPStreamĀ that accepts a ZIP file as input containing multiple .rapidstart files.
  2. Someone gives me a solution šŸ˜€

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s