Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

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

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
    JensLykkegaard 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
    Judy 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans