Skip to main content

Notifications

Business Central forum
Suggested answer

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

editSubscribe (0) 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
 
 
Categories:
  • 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:

Helpful resources

Quick Links

Take the Community feedback survey!

Answer this brief 15-question survey about your Community experience…

Demystifying Copilot: Service Edition with Sundar Raghavan

Sundar answers more questions about Copilot for Service...

Dynamics 365 Business Central vs Finance and SCM

Take a look at the key differences between Business Central and…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,375 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 223,308 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,140

Featured topics

Product updates

Dynamics 365 release plans