Object ID should not be in declaration (LC0003)
Object IDs should be defined in the app.json file using ID ranges rather than hardcoded in object declarations. This makes it easier to manage object IDs centrally and avoids conflicts when multiple developers work on the same project.
A code fix is available for this diagnostic.
Example
The following object has a hardcoded ID:
codeunit 50100 MyCodeunit // Object ID should not be in declaration [LC0003]
{
}
To fix this, configure ID ranges in app.json and use a zero ID in the declaration:
codeunit 0 MyCodeunit
{
}
Then ensure your app.json has proper ID ranges configured.