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

Notifications

Announcements

No record found.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans