If you plan to read this post you’ve probably already converted or planned to, your C/AL solution to AL extension.
AL extension data are not sotred as C/Side even for modified existing table (exemple if you add field on customer will produce somthing like: [dbo.Cronus$Customer$your-extension-guid])
The problem is you can’t have your C/Side solution and it AL version at the same time in your base and Microsoft does not provide any tool to make the transfer.
I’m bouncing out from the following very nice post of hougaar, he made an SQL script generator allowing to bakcup the C/Side data into temp. table then import it back into extension table : Uplift Data from C/Side objects to AL extension script generator (I wasn’t able to post comment out there)
I’ve personnally used it and enhance few stuff it’s why i’m writing this. I’ve also convert it into C/AL page to avoid the need of symbol regeneration (kind of long stuff, Running C/Side and AL side-by-side).
The methodology I’ve used with a bit more detailed than original post is writed bellow. Following this methodlogy carrefully is arround 2h straight for small base and a bite more huge database/solution.
- Business Central V14 database with your C/AL solution
- Please Backup your base we are not responsible of any dommage
- Admin. right on the database
- Your C/Side solution migrate to Extension ready to publish
- The extension target solution must match the field and table name of the C/Side. The field and table transfer is based on there names, not No.
- Uplift Data Cside to AL script generator.
Download .zip here with fob and source text
- Install the uplift script generator page and run it (run the first page 99990 from development environment)
- Set your target extension GUID (available in your app.json)
Then select the new table created by your C/AL solution you want to migrate
Select the fields no. range added on standard table. The found result will shown in sub page
- Use “Generate SQL Script”, the page will generate 3 different SQL script to be executed
- Execute the first SQL script, this will move all C/AL solution specific data to temporary tables. The syntax checker will not recognize the renamed table select it’s totally normal.
- Remove all your C/AL new tables previously selected
Remove your C/AL new field on std. table : import cronus Fob to erase them all if you’ve selected all or remove them manually if you don’t
- Regenerate your base symbols references with finsql command HERE or import the standard symbol from the BC installation DVD\ModernDev\[…]\System.app with
Publish-NavApp cmdlet and option -PackageType SymbolsOnly
Check “EnableSymbolLoadingAtServerStartup” is well enabled on your service
Restart your service
- Execute powershell cmdlet Sync-NAVTenant -ServerInstance <BC14> -Mode forceSync
- You have now a clean standard v14 base with temp table containing your solution data
Publish and install your extension solution (please restart your service again if any symbol or metadata error occur)
- Execute the second SQL Script to import the temp table data into extension table
If your extension have less fields than original C/Side solution, some SQL update will have to be modified manually in order to remove them (didn’t find easy SQL command to avoid this problem)
Check if your data is accessible from BC user interface
- If all is done as expected, you can remove temp table with the third SQL script and remove the uplift pages 99990 and 99991.
- (Optional) Relax yourself
Please feel free to use and contriube