संपादित करें

इसके माध्यम से साझा किया गया


AppSourceCop Error AS0083

It is not allowed to delete a value from an enum.

Description

Deleting an enum value is not allowed, unless the enum is marked as obsolete. This restriction prevents dependent extensions from breaking, if they use the enum value.

Remarks

This error ensures that enum values remain consistent and available across different versions of an extension. Deleting an enum value can cause significant issues for dependent extensions that rely on that value. These extensions may fail to function correctly if the expected enum value is missing, leading to runtime errors and unexpected behavior. By marking an enum value as obsolete instead of deleting it, you provide a transition period during which dependent extensions can adapt to the change without breaking.

How to fix this diagnostic?

To resolve this error, follow these steps:

  1. Locate the enum value in your code that has been deleted.
  2. Re-add the deleted enum value to the enum definition.
  3. If the enum value should no longer be used, mark it as obsolete instead of deleting it.

AppSourceCop Analyzer
Get Started with AL
Developing Extensions