microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
796 stars 622 forks source link

[Bug]: ODataV4 always provide the data in a Primary Key order from BC23 #25619

Closed HegedusZsolt closed 9 months ago

HegedusZsolt commented 11 months ago

Describe the issue

As we realized in BC23 release, if you are trying to retrieve data via ODataV4 protocol, you will got the data always in a primary key order. It does not matter you are setting a different sort order in a SourceTableView property or OnOpenPage trigger of the page.

If you run the page in a WebClient or retrieve the data via SOAP protocol it works well, you will got the data in a right order, and it worked with ODataV4 also till BC23.

Expected behavior

ODataV4 protocol should provide the data in right sort order what we have set on the page, not always in a primary key order.

Steps to reproduce

  1. Create a simple list page, based on table Customer, with the two following fields No. and Name.
  2. Set sort by Name with a SourceTableView property or with a setcurrentkey statement in trigger OnOpenPage
  3. Run the page in the WebClient. You will got the list of the customers by Name
  4. Publish the page as web service
  5. Click on an ODataV4 URL for this page and you will got the list of the customers by No.

Additional context

This "feature" breaks our app, so please handle this with priority.

mynhardt7 commented 11 months ago

This is not the correct place to post bug reports. You need to open a support request with Microsoft.

JesperSchulz commented 9 months ago

That sounds like a product defect! Unfortunately, this repository is only for extensibility requests for Dynamics 365 Business Central or pull requests towards the 1st party Business Central apps. We suggest that you open a support case or file a bug to ensure that all Business Central users benefit from your catch as soon as possible:

On premises - https://support.microsoft.com/en-us/supportforbusiness/productselection?sapId=93d37907-ad94-d591-22e9-593cfa09dd3f

Cloud – contact your partner, or if you are a partner open a support incident through Partner Center - https://partner.microsoft.com/en-us/pcv/dashboard/overview