Skip to content

AL0603 An implicit conversion is being performed from a value of type 'Option' to a value of type 'Enum "Purchase Line Type"'. This conversion can lead to unexpected runtime issues. This warning will become an error in a future release.AL(AL0603) #5800

@RoieSantos

Description

@RoieSantos

Describe the Warning
We are currently updating our extension to BC16 in the ${CodeCop} declared under code analyzer it is showing multiple warnings. Below is one "AL0603 An implicit conversion is being performed from a value of type 'Option' to a value of type 'Enum'

To Reproduce
Steps to reproduce the behavior:

  1. AL Language extension is installed (5.0.254558)
  2. Create a page extension of "Purchase Line" (39)
  3. In the table list there is a field "Type" which is now a "Enum" data type
  4. Previously we are inserting data from option and it was working fine. now it showing this warning.

Screenshot
image

Versions:
AL Language 5.0.254558
Business Central : 16.0.11209.0 (Preview)

Can we ask what is the best practice to eliminate the warning? thanks

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions