In the last 6 months I’ve been involved with a number of GP to BC migration projects.
A recurring question that reaches our team is how do I see GP data in BC?
One avenue to move your business to BC is to import open transactions and master data, and tested setup tables with RapidStart packages. If the underlying table of the desired GP entity does not exist in BC, then a Business Central developer would need to create the table in BC and, with Edit In Excel functionality you can get GP data in BC.
There is also the Cloud Migration Tool in BC. More about it here.
Using this tool ensures the most important entities, master data and open transactions, will make it into BC. But what if a GP end-user wants additional GP data in BC?
Microsoft recommendation is to bring as little as possible into the cloud from an on-premise database.
Moreover, as your database capacity increases, your cost can increase. See more here.
If the decision is, though, to have some GP data in Business Central, there are tools to make that possible.
We can extend the cloud migration tool so that, when the migration starts, beside the core migrated data (master data and open transactions) the process will also bring into a new space (an extension table) the data from the GP table as mapped in the “Manage Custom Tables” page.
What’s needed to achieve this:
Create a Business Central extension. In it, create an AL table to store your data from a GP table
Add the custom table in Manage Custom Tables
Run migration tool
Check custom table content after migration
Let’s try bringing table GL00100 from GP in BC.
Note: this table was chosen only for demonstration. GL00100 is brought by default by the cloud migration tool into BC table “G/L Account”.
Create extension with GP table
I created an extension that includes a table for this GP entity:
Map migration for new table in “Cloud Migration Management”
In Business Central, search for “Cloud Migration Management”.
Under actions trigger “Manage Custom Tables” action:
Under “Migration Table Mapping” page, map new table in your extension to the GP table:
On “Migration Cloud Management” trigger the “Run Migration Now” action.
You can check the results in the cue on the Migration Information area:
To check the content migrated:
change the company to the migrated company
run the new table by adding “&Table= 50340” to the Business Central URL:
We can now see the result of migrating the GP data to the custom BC table:
To answer the question in the title, you don’t lose GP data. There are multiple ways of accessing your GP data post go-live to BC, involving:
retaining the access to your old system
migrate your Dynamics GP installation to Azure (SQL Server and application)
migrating your GP data warehouse to Azure Data Lake
or, as shown above, with minimal coding, keeping your GP data in Business Central
Engage with your partner and decide what GP data do you really need today so that long term your cloud ERP stays performant.
As most probably know, it is not possible to access the file system while in Business Central cloud environment.
For example, in Dynamics NAV, we could have a job queue entry that, when run, creates a file and copies it in a network folder. We can still do that in an On-Premise environment, but not with cloud BC.
You could create the file and use DownloadFromStream, but that would only prompt you do download it locally, but would not copy it somewhere on a local or network folder.
If you try to use File.Create() you would get the warning: “The type or method ‘Create’ cannot be used for ‘Extension’ development”.
If your customer is happy to grab the file manually every time from the downloads folder then this should suffice:
But, if we want to automatize this process and run the extract on a regular basis, we need to find a cloud solution for storing the files.
Currently, there are 4 types of storage in Azure platform:
In my previous blog I dived into the Azure Storage of type Tables and tackled its API.
This blog is about interacting with the Azure storage blob containers:
manually, via Azure Portal
simulation, via VS Code extension “Rest Client”
Business Central extension
view blob container with Excel
get Azure Blobs locally
I found on Michael Megel’s blog a nice solution for exactly what I need. Awesome job on Blob Containers API, Michael! Thank you for sharing!
What I need:
Set up a blob container to store Business Central exported files
Set up Storage Access Key
In VS Code, write requests with “Rest Client” extension, targeting Azure blob container API
A setup table in Business Central for Azure access stuff
Wrote an export interface that would allow users to run an action(“Write File in Azure”) that will send the extract to Azure container. The same code could be executed by a job queue.
Blob Container Setup
To set up a container, following Michael’s notes on above blog was enough for me.
For blob container accessibility I went on the path of shared access signature “SAS Token”.
Once created, you can start playing with the storage account container API.
I created the storage manually:
Drilling down into the storage account, I created a new container: