AL icon indicating copy to clipboard operation
AL copied to clipboard

Error after unpublishing the app

Open bachii1010 opened this issue 9 years ago • 7 comments

Hi,

We are getting the below error when we are importing and then compiling the object in NAV database which is used in the app after the unpublish of the app. image

Please suggest.

Thanks & regards Varun Reddy

bachii1010 avatar Nov 09 '17 10:11 bachii1010

Can any one help on this issue..

Nagaraju17 avatar Nov 10 '17 05:11 Nagaraju17

From the looks of it, you're doing this stuff locally using the management cmdlets? (e.g. Publish-NavApp)

After you 'unpublished' your extension, did you clean the schema? For V2 extensions there is a 'Sync' process that must be done after publish before you can install a package. This is the process that adds the tables/table extensions you developed to SQL and can be performed using the 'Sync-NavApp' cmdlet.

The tables that are created during this process 'live on' even after you've unpublished your extension, and I think that might be the problem you're running into.

In order to 'remove' them and bring your DB schema back to what is was before the extension, you need to use the 'clean' mode of the sync cmdlet.

Sync-NavApp -Name <ext name> -Mode Clean

This will remove any tables/fields added by EVERY VERSION of the extension. As a result of this, you will also LOSE ALL OF THE DATA that was in those tables.

ghost avatar Nov 10 '17 22:11 ghost

Hi,

We are not using cmdlets to publish or unpublish the app.

We do Ctrl + F5 to publish the app and from the extension management page we click unpublish to unpublish the app.

Please suggest still we have to do sync.

It should do automatically?

bachii1010 avatar Nov 15 '17 05:11 bachii1010

Yes, you will still have to do a sync in this scenario. The 'unpublish' action on the extension management page does not do this automatically.

ghost avatar Nov 15 '17 16:11 ghost

Hi,

Can this be automated in future updates so that when the unpublish action is clicked the sync happens automamtically.

It would be a nice feature.

bachii1010 avatar Nov 16 '17 07:11 bachii1010

Hi, after using the sync command as said above after unpublishing i am still getting the below error when i compile the object image

can you please suggest on this.

Nagaraju17 avatar Dec 11 '17 09:12 Nagaraju17

This error should only occur if your table definition contains multiple fields with the same 'name' property. Since this is happening during compilation of the table in C\SIDE, I would first just double check that the 'Sales Header' table doesn't have duplicate fields.

Additionally, I would double check that it isn't another installed extension that is adding this field by uninstalling any/all extensions. Since C\SIDE (the development environment) cannot 'see' fields added by extensions, this could occur if an extension were installed that added a field to the Sales Header table, and then a developer went into C\SIDE and added that field again to the Sales Header table.

ghost avatar Dec 12 '17 22:12 ghost