Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

OData filter query

(0) ShareShare
ReportReport
Posted on by

hi everyone - i am trying to figure out how to apply filter to OData call based on a date field. I am using the below to get all the data from purchase order lines where CONFIRMEDDELIVERYDATE  >= today's date but i am getting "bad data request" error.

any idea how to get this to work?

xyzxyzxyzxyx.ax.dynamics.com/.../PurchaseOrderLines$filter=CONFIRMEDDELIVERYDATE ge now()&cross-company=true

*This post is locked for comments

  • SnowShine Profile Picture
    SnowShine on at
    RE: OData filter query

    thank you add - how do i use a dynamic date in there such as today's date?

  • add Profile Picture
    add on at
    RE: OData filter query

    Hello SnowShine,

    I think that the function Now() is not supported. I tried this filter and it works:

    ?$filter=ConfirmedDeliveryDate gt 2017-01-01

    But when I try to use now() it shows this error:

    Unknown function 'now'.

    Note that field names are case sensitive and there is no need for quotes ('') on the date.

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,354 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans