Forum Discussion

JeremyF's avatar
JeremyF
Experienced User
3 years ago

Odata date queries intermittent error.

Hi Dev Folks,

 

Is anyone haveing problems with odata date queries on the /Purchase/Order/Item end point?

 

$filterArray = array('$filter' => "Date gt datetime''2021-01-01T00:00:00Z'");

 

Is throwing up this intermittently. 

An exception was thrown that was not handled correctly. If this situation persists please contact developers@myob.com for further assistance.

 

  • JeremyF's avatar
    JeremyF
    Experienced User

    Hi an Update for any one interested

     

    The odata queries are really finicky

     

    By adding a second term 'Status eq 'Open' and Date gt datetime'2022-01-01'

     

    The query works and no errors are generated.

     

    NOTE: This appears to only be an issue with /Purchase/Order/Item on large company files with thousands of orders. 

    Weird!