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
744 stars 245 forks source link

Sequence contains no matching element breaks all the webservices #6247

Closed MortenRa closed 2 years ago

MortenRa commented 4 years ago

TestWs.zip Describe the bug When exposing a field in a query which has a "calcformula = exist" it breaks all the webservices when query is exposed as webservice from version17.0 do however works in 16.5. One are allowed to publish a webservice but once you use the webservice the error occurs in webclient: Sequence contains no matching element

if this is not allowed then the compiler should warn that you use a field with a CalcFormula = exist or CalcFormula = - Exist and should not be able to compile extension.

To Reproduce Steps and to reproduce the behavior:

  1. Go to web services and add your query, then click the webservice/odata URL

AL Code to reproduce the issue AL project attaced TestWs.zip use this query

query 50100 "TEST WS"
{
    elements
    {
        dataitem(Item; "Item")
        {
            column(No; "No.")
            {
            }
            column(Assembly_BOM; "Assembly BOM")
            {
            }
        }
    }
}

Expected behavior Should just work

Warn that you use a field with a calcformula = exist and should not be able to compile extension

Screenshots

5. Versions:

dzzzb commented 4 years ago

Surely this should work; just making it a compile-time error would be the wrong solution.

fvet commented 3 years ago

This is also breaking our API's moving towards v17.

Expected behavior Should just work. It used to work on a BC 16.3.

@PooyaKharamesh Can you please change the label from CodeCop to Bug? Any fix expected in the BC 17.1?

github-actions[bot] commented 2 years ago

Hi,

Many thanks for raising this issue. Unfortunately we have not been able to get to this issue as soon as we'd have liked. Since it has been a long time since this issue was last updated, it is possible that this has been fixed by a newer release of Business Central and the AL extension for Visual Studio Code. We have thus decided to close it.

If the issue still affects you on the latest insider build of Business Central, please help us and open a new issue for us with the latest steps to reproduce the issue, and link back to this closed issue to track any comments or discussions.

Thanks,
Thaddeus