New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve data #62

Closed
waldo1001 opened this Issue Jan 11, 2017 · 14 comments

Comments

Projects
None yet
@waldo1001
Contributor

waldo1001 commented Jan 11, 2017

When I press F5 after a previous build, I notice that I lost all data.

Do I have to foresee an upgrade-codeunit with the global functions as I had to in ExtensionsV1 as well?

@dennisfrostlander

This comment has been minimized.

Show comment
Hide comment
@dennisfrostlander

dennisfrostlander Jan 11, 2017

Contributor

Currently it is not possible to use NavApp functions when developing extensions, but this whole feature is on our radar. No ETA yet.

Contributor

dennisfrostlander commented Jan 11, 2017

Currently it is not possible to use NavApp functions when developing extensions, but this whole feature is on our radar. No ETA yet.

@waldo1001

This comment has been minimized.

Show comment
Hide comment
@waldo1001

waldo1001 Jan 11, 2017

Contributor

well, apparently VSCode recognises it ..
image

but you say it doesn't work. So can I conclude there is no way to preserve data at this point?

Contributor

waldo1001 commented Jan 11, 2017

well, apparently VSCode recognises it ..
image

but you say it doesn't work. So can I conclude there is no way to preserve data at this point?

@dennisfrostlander

This comment has been minimized.

Show comment
Hide comment
@dennisfrostlander

dennisfrostlander Jan 11, 2017

Contributor

Intellisense does recognize it, however you will get a compilation error once you complete the code. "The type or method 'RestoreArchiveData' cannot be used for 'Extension' development.'
At this point not all functions are allowed for extension development.
We are currently discussing the scope of this feature, I will get back to you on this thread.

Contributor

dennisfrostlander commented Jan 11, 2017

Intellisense does recognize it, however you will get a compilation error once you complete the code. "The type or method 'RestoreArchiveData' cannot be used for 'Extension' development.'
At this point not all functions are allowed for extension development.
We are currently discussing the scope of this feature, I will get back to you on this thread.

@waldo1001

This comment has been minimized.

Show comment
Hide comment
@waldo1001

waldo1001 Jan 11, 2017

Contributor

Thanks.

Well, I would appriciate that the scope would be "preserve data" - even in development phase ;-).

Contributor

waldo1001 commented Jan 11, 2017

Thanks.

Well, I would appriciate that the scope would be "preserve data" - even in development phase ;-).

@kine

This comment has been minimized.

Show comment
Hide comment
@kine

kine Mar 13, 2017

Contributor

Some progress on this? I can finish the code, it is compiled, but no data restored when I use
`
codeunit 70000000 UpgradeData
{
trigger OnRun();
begin
end;

procedure OnNavAppUpgradePerDatabase();
begin

end;
procedure OnNavAppUpgradePerCompany();
begin
    NavApp.RestoreArchiveData(70000000,false);
    NavApp.RestoreArchiveData(70000001,false);
    NavApp.RestoreArchiveData(70000003,false);       
end;

}`

Contributor

kine commented Mar 13, 2017

Some progress on this? I can finish the code, it is compiled, but no data restored when I use
`
codeunit 70000000 UpgradeData
{
trigger OnRun();
begin
end;

procedure OnNavAppUpgradePerDatabase();
begin

end;
procedure OnNavAppUpgradePerCompany();
begin
    NavApp.RestoreArchiveData(70000000,false);
    NavApp.RestoreArchiveData(70000001,false);
    NavApp.RestoreArchiveData(70000003,false);       
end;

}`

@StanislawStempin

This comment has been minimized.

Show comment
Hide comment
@StanislawStempin

StanislawStempin Mar 14, 2017

Member

This is still work in progress. We will update this thread once we have a solution proposal

Member

StanislawStempin commented Mar 14, 2017

This is still work in progress. We will update this thread once we have a solution proposal

@vjekob

This comment has been minimized.

Show comment
Hide comment
@vjekob

vjekob Jun 9, 2017

Apparently, I can add those functions (OnNavAppUpgradePerCompany and OnNavAppUpgradePerDatabase) and apparently they also execute and inside of them I can write into the tables. However, when extension is uninstalled it simply deletes the data, rather than archiving the data.

Has anything changed here?

vjekob commented Jun 9, 2017

Apparently, I can add those functions (OnNavAppUpgradePerCompany and OnNavAppUpgradePerDatabase) and apparently they also execute and inside of them I can write into the tables. However, when extension is uninstalled it simply deletes the data, rather than archiving the data.

Has anything changed here?

@RasmusTidselbak

This comment has been minimized.

Show comment
Hide comment
@RasmusTidselbak

RasmusTidselbak Jul 5, 2017

@StanislawStempin Will we get a similar feature as in the V1 extensions or will it be completely different?

RasmusTidselbak commented Jul 5, 2017

@StanislawStempin Will we get a similar feature as in the V1 extensions or will it be completely different?

@hvogelpohl

This comment has been minimized.

Show comment
Hide comment
@hvogelpohl

hvogelpohl Aug 24, 2017

I used some initialization functionality next to the NAVAPP Restore functions in OnNavAppUpgradePerCompany. These don't work as well for now. Anyway I guess it's bad coding to do so at that place.

hvogelpohl commented Aug 24, 2017

I used some initialization functionality next to the NAVAPP Restore functions in OnNavAppUpgradePerCompany. These don't work as well for now. Anyway I guess it's bad coding to do so at that place.

@bwdeleeuw

This comment has been minimized.

Show comment
Hide comment
@bwdeleeuw

bwdeleeuw Nov 30, 2017

@StanislawStempin with NAV 2018 dropping on Friday, is there anything known on this issue?

bwdeleeuw commented Nov 30, 2017

@StanislawStempin with NAV 2018 dropping on Friday, is there anything known on this issue?

@StanislawStempin

This comment has been minimized.

Show comment
Hide comment
@StanislawStempin

StanislawStempin Dec 6, 2017

Member

We are currently working on it.

Member

StanislawStempin commented Dec 6, 2017

We are currently working on it.

@yandko

This comment has been minimized.

Show comment
Hide comment
@yandko

yandko Dec 22, 2017

@StanislawStempin, do you have any timeline in mind? This becomes very critical for those folks that are planning to use VS Code as their primary dev environment for extensions on NAV2018. All workarounds to restore the data requires time to support that eliminate all efficiency we received with AL.

yandko commented Dec 22, 2017

@StanislawStempin, do you have any timeline in mind? This becomes very critical for those folks that are planning to use VS Code as their primary dev environment for extensions on NAV2018. All workarounds to restore the data requires time to support that eliminate all efficiency we received with AL.

@DominikDitoIvosevic

This comment has been minimized.

Show comment
Hide comment
@DominikDitoIvosevic

DominikDitoIvosevic Dec 27, 2017

We are actively working on this but I don't think I'm allowed to promise you more than "very soon"

DominikDitoIvosevic commented Dec 27, 2017

We are actively working on this but I don't think I'm allowed to promise you more than "very soon"

@DominikDitoIvosevic

This comment has been minimized.

Show comment
Hide comment
@DominikDitoIvosevic

DominikDitoIvosevic commented Feb 14, 2018

This feature has been implemented and you can read more about it here:
https://docs.microsoft.com/en-us/dynamics-nav/developer/devenv-retaining-data-after-publishing

@Microsoft Microsoft locked and limited conversation to collaborators Apr 17, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.