• permentierbart

Upgrade-Toolbox

It's been a while but I'd like to share an Extension that we have been using for over a year now and it greatly helped us moving C/Side customers to AL(OnPrem).


In short, this extension will match the fields that you added in C/Side with fields that you created in an AL TableExtension; and custom C/Side tables with AL Tables so you can easily transfer the data.

The data can be transfered inside Navision or it can generate an SQL statement.

You can find the repo here: https://github.com/BartPermentier/Upgrade-Toolbox


1. Prerequisites

You need to be in the last step of the upgrade process, meaning:

- The Customer database is in NAV2018, BC13, or BC14 (Technical and Data Upgrade)

- The Customer database has the base C/Side fobs compiled, with the custom fields merged

- Your AL version of the Customer Solution is published on the database

So currently in all the tables you extended you have the old C/Side-fields and the new AL-fields. Fex:


You don't need to add all the fields in your AL solution. For the solution to work automatically you need to match the Caption of the C/Side version with the Caption of your AL Version. We match on Caption level because as you all know you need to add the prefix of your customer when extending tables. Old C/Side tables usually have new fields from the 50000 range so internally we agreed to create AL TableExtension fields in the 80000 range.


2. Publish Upgrade-Toolbox

No need for dependencies just publish the extension.


3. Match your tables and fields

Go to Upgrade Table List.

Click on Generate Upgrade Entries

A page pops open where you can choose which extension you want to match tables/fields with.

Next you fill in your Prefix/Suffix.

When you click OK you should see the list filled with standard tables and custom tables:


You have a column "No. of skipped fields" this should be 0. if not you can click on it to see which field he skipped.


In my example he found a field "NAP Invoiceable" but he was not able to match it with a C/Side field. This is possible because maybe you already added new fields to the AL version that did not exist in the old version. If that is the case then you can just leave it on skip.

If you are not sure you can click on the drop down OriginalFieldID and search for your original field.


In our example the previous partner created the field "Invoicable" which is not the same as "Invoiceable"so the system did not match automatically.

There are multiple solutions to solve this:

1. Just fill in the field manually. Easiest solution but if you ever click on "Generate Upgrade Entries" again then you will have to match it again.

2. Modify the caption in AL. If you do this then the next time you generate the entries he will match it perfectly. But the downside is that you have a caption which is wrong.

3. You might have guessed the best solution already: just modify the caption in C/Side.


4. Transfer the Data

Once you are satisfied with the match propositions we can transfer our data. As stated before you can either transfer the data in NAV (depending on the size of your database this could take a while). Or you can generate a SQL Query whichyou can run in SQL Mgt. Studio.


4a. Transfer Data Selected Entries

This will transfer the data for the selected entries for the current company.


4b. Create SQL Statement

This will open the companies list where you can select all the companies for which he should generate a Query. Then you choose a destination where he may generate the sql file and voila:


I hope you guys can make use of this; it saved me and my team a lot of time!

©2018 by AL Toolbox.

This site was designed with the
.com
website builder. Create your website today.
Start Now