Al: How to use the NAVAPP functions in OnNavAppUpgradePerCompany to save data

Created on 28 Nov 2018  路  3Comments  路  Source: microsoft/AL

Good day.

Sorry in advance for dublicate, but I can't find answer into the MS sites and MS suuport CAN"T answer directly on the question - HOW TO write this codeunit with simple case.

The issue is (it is very simple description of the small situation to avoid possibility to go-out of the clear response):

  1. I have NAV database with 2 Companies where a Ledger table exist;
  2. it is Ledger table exist with some fields and current installation has many lines;
  3. I'm using VSC (version 1.29.1) and "schemaUpdateMode": "Synchronize" in the JSON-file;
  4. I re-designed the solution a little and want to update (type or name) or delete 2 fields. When I tried to publish it I received that I can't publish it from VSC.

The result I have real database and I need to write Upgrade codeunit with conditions:

  • I need to have ALL records with SAME table number;
  • All records should have 100% same data (but exclude 2 fields)
  • 2 fields should gone

I think I wrote clear now to receive qualified answer, but not just senseless answer with wast褍 link to MS site. Please, take into account that You are a solution developer and ONLY YOU know HOW it SHOULD work.
Thank you in advance for your understanding and answer.

P.S. I tried to use some upgrade codeunits with NAVAPP functions in the OnNavAppUpgradePerCompany, but it does not work.

question

All 3 comments

This repository no longer handles general questions and is only dedicated to bug reports and feature suggestions for the AL compiler and developer tools.

To get help for your question please use one of the following resources:
Business Central Community
mibuso forum
Dynamics User Group

It is a bug, but not general question! The functionality which you developed (supported) is not working like in MS DOCs.
And thank you again that you confirmed that support team CAN"T (just doesn't not have knowledge and possibility) handle hard requests ))

P,S. MS should think MORE and MORE about own products if they want customer will start using a solution in cloud.. Just 1 shared fact that it is not possible to do correct update..

I'm having a simular issue. I don't see anyway that would allow me to do a destructive schema change to my Extension without losing all my data. This is contrary to the claims on the docs page and a huge issue on for the lifecycle of extensions as you will never be able to do any refactoring or optimizing of anything that ever went productive.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ThomasBrodkorb picture ThomasBrodkorb  路  3Comments

bvbeek picture bvbeek  路  3Comments

worldofthenavcraft picture worldofthenavcraft  路  3Comments

AndersMad picture AndersMad  路  3Comments

kine picture kine  路  3Comments