web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

New Invisible Error in Querie after migratating in V24 (Saas)

(1) ShareShare
ReportReport
Posted on by 4
Hello, since the update to v24, we have encountered an error (which does not trigger any Business Central error) on one of our queries. After several tests, it seems that this may be related to some of our fields that are in the filter format.
For example this querrie:
/// <summary>/// Query API-Today Total Order CP0 (ID 50001)./// </summary>query 50001 /API-Today Total Order CP0/{    APIGroup = 'cap';    APIPublisher = 'cap';    APIVersion = 'v1.0';    EntityName = 'todayTotalOrder';    EntitySetName = 'todayTotalOrders';    QueryType = API;    elements    {        dataitem(salesHeader; /Sales Header/)        {            filter(documentType; /Document Type/)            {            }            column(sellToCustomerNo; /Sell-to Customer No./)            {            }            filter(creationDate; /Creation Date CP0/)            {            }            dataitem(salesLine; /Sales Line/)            {                DataItemLink = /Document No./ = salesHeader./No./;                filter(type; Type)                {                }                column(sumLineAmount; /Line Amount/)                {                    Method = Sum;                }            }        }    }    var        endDate: DateTime;        startDate: DateTime;    trigger OnBeforeOpen()    begin        //La startDate est à la date d'hier à 18h01:00        startDate := CreateDateTime(CalcDate('<-1D>', Today()), 180100T);        //La endDate est à la date d'aujourd'hui à 18h00:59        endDate := CreateDateTime(Today(), 180059T);        SetRange(documentType, Enum::/Sales Document Type/::Order);        SetRange(creationDate, startDate, endDate);        SetRange(type, Enum::/Sales Line Type/::Item);    end;}
Return code 200 but the json is malformated by Business central : $homeUrl//todayTotalOrders?%24filter=sellToCustomerNo eq %273030%27 (worked fine in v23)
 
but if i change two filter in column (Document Type and Type) : 
/// <summary>/// Query API-Today Total Order CP0 (ID 50001)./// </summary>query 50001 /API-Today Total Order CP0/{    APIGroup = 'cap';    APIPublisher = 'cap';    APIVersion = 'v1.0';    EntityName = 'todayTotalOrder';    EntitySetName = 'todayTotalOrders';    QueryType = API;    elements    {        dataitem(salesHeader; /Sales Header/)        {            column(documentType; /Document Type/)            {            }            column(sellToCustomerNo; /Sell-to Customer No./)            {            }            filter(creationDate; /Creation Date CP0/)            {            }            dataitem(salesLine; /Sales Line/)            {                DataItemLink = /Document No./ = salesHeader./No./;                column(type; Type)                {                }                column(sumLineAmount; /Line Amount/)                {                    Method = Sum;                }            }        }    }    var        endDate: DateTime;        startDate: DateTime;    trigger OnBeforeOpen()    begin        //La startDate est à la date d'hier à 18h01:00        startDate := CreateDateTime(CalcDate('<-1D>', Today()), 180100T);        //La endDate est à la date d'aujourd'hui à 18h00:59        endDate := CreateDateTime(Today(), 180059T);        SetRange(documentType, Enum::/Sales Document Type/::Order);        SetRange(creationDate, startDate, endDate);        SetRange(type, Enum::/Sales Line Type/::Item);    end;}
The result was ok : 
 
 I think a new system bug has appeared with v24. If anyone has an idea or can tell me how to report the information directly to Microsoft?
 
Thank you.
 
Kevin
 
 
I have the same question (0)
  • Suggested answer
    Judy Profile Picture
    Microsoft Employee on at
    Hi, if the issue persists, you can raise a SR from admin center as following image:
  • JensLykkegaard Profile Picture
    2 on at
    Hi 
     
    As yoiu mentioned that it might have something to do with Fields: 
     
    Have you seen tis from Erik Hougaard : Business Central 2024 Wave 1 might break your API integrations
     
     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,948 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 936 Super User 2026 Season 1

#3
Teagen Boll Profile Picture

Teagen Boll 616 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans