AL icon indicating copy to clipboard operation
AL copied to clipboard

Object Already delcared

Open AmolSalvi opened this issue 9 years ago • 6 comments

Hi, Whenever I execute the objects it displays the message that the number given to code unit object is already exist. An Application object of type codeunit with id 'XXXXXXXX' is already declared

Kindly let me know how to resolve.

Amol

AmolSalvi avatar Jul 26 '17 04:07 AmolSalvi

Change the ID then just try it until you get a non-assigned ID.

Gallimathias avatar Jul 26 '17 05:07 Gallimathias

If you see the error in the 'Problems' panel that means you have two codeunits with the same id in your source code and you can then click on the errors to go to the codeunits. However if you get this message when you try to publish your extension, then you probably have another extension published to the server with a codeunit that uses the same id.

You can fix this by changing the id of your codeunit in the extension you are trying to publish to something not in use or uninstalling the extension on the server by going to the page 'Extension Management'.

thpeder avatar Jul 26 '17 08:07 thpeder

Thanks for response as I changed the id of object as I couldn't find the same id object in my project and even though extension was not installed.

AmolSalvi avatar Jul 26 '17 10:07 AmolSalvi

I could be that you published your extension, changed the name and then tried republishing. You may not have the source code for the previously named extension anymore but it's still published to the server

doivosevic avatar Jul 31 '17 12:07 doivosevic

@AmolSalvi can we help you further with this? Right now we need more info to be able to try and repro this

doivosevic avatar Aug 02 '17 07:08 doivosevic

Hi Domini Thanks for your help. Its resolved

Regards Amol

AmolSalvi avatar Aug 02 '17 15:08 AmolSalvi