Skip to main content

Notifications

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 2
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
 
 
  • JensLykkegaard Profile Picture
    2 on at
    New Invisible Error in Querie after migratating in V24 (Saas)
    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
     
     

     

  • Suggested answer
    Judy Profile Picture
    Microsoft Employee on at
    New Invisible Error in Querie after migratating in V24 (Saas)
    Hi, if the issue persists, you can raise a SR from admin center as following image:

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 1,452

#2
YUN ZHU Profile Picture

YUN ZHU 1,313 Super User 2025 Season 1

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 1,083 Most Valuable Professional

Featured topics

Product updates

Dynamics 365 release plans