microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
728 stars 241 forks source link

Editable property with dynamic date expression gives run-time error #5895

Closed AskeHolst closed 4 years ago

AskeHolst commented 4 years ago

Describe the bug When date comparison is used as dynamic expression on a Editable property a run-time error occurs.

To Reproduce Steps and to reproduce the behavior:

  1. Create a page
  2. Add a field with an Editable property based on an expression comparing another date field to 0D
  3. Compile and run
page 50100 "Editable Bug Repro"
{
    PageType = List;
    SourceTable = "Sales Line";

    layout
    {
        area(content)
        {
            repeater(General)
            {
                field("Planned Shipment Date"; "Planned Shipment Date")
                {
                    ApplicationArea = All;
                }
                field("Planned Delivery Date"; "Planned Delivery Date")
                {
                    ApplicationArea = All;
                    Editable = "Planned Shipment Date" = 0D; // This will cause a run-time error
                }                                 
            }
        }
    }
}

Expected behavior Simple boolean expressions can be used for the Editable property.

Screenshots The run-time error when opening the page: image

5. Versions:

atoader commented 4 years ago

Hi! Please take a minute to read the guidelines for this repository https://github.com/microsoft/AL and our collection of frequently asked questions https://github.com/Microsoft/AL/wiki/frequently-Asked-Questions .

As this repository is only for issues related to the AL compiler in latest developer preview environment for Dynamics 365 Business Central. We suggest that you open a support case or file a bug in Collaborate, to ensure that all Business Central users benefit from your catch as soon as possible.

To open a support case, you can:

If you file the bug in Collaborate, remember to include steps to reproduce the issue, and the Business Central build number and country version you're using.

AskeHolst commented 4 years ago

@atoader Why would this not qualify as bug for this repository? Is it due to it generating a runtime error and not a compile time error? Just trying to understand what goes where.

NKarolak commented 4 years ago

@AskeHolst As I understand it, this repo handles issues of the AL Language extension only, hence issues that may happen until the application is built. This does not cover run-time errors of the application that you have created.

AskeHolst commented 4 years ago

@NKarolak Thank you, that makes some sense.

atoader commented 4 years ago

Thank you, Natalie! You are correct. We are trying to keep the scope of the repository focused so that we can offer value in our area of expertise. Unfortunately, 50-80% of the issues that hit the repository each day are not related to the tools, and to try to focus on the 20%, we try to close them with the standard reply and guidance on where to post them.