Skip to main content

Notifications

Announcements

No record found.

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

problem in 'gt' filter while get invoices from business central API

(1) ShareShare
ReportReport
Posted on by 72
Hello Experts,
 
It's been 3 days where I am facing one issue in API URL while using /gt/ filter when my invoice records started greater than 99999 invoice number.
 
https:/api.businesscentral.dynamics.com/v2.0/Production/api/v1.0/companies(86402545-a58c-eb11-8ce5-0022489a59b2)/salesInvoices?$filter=number gt '102630'
 
Only one invoice 102631 is created after 102630 but when I executed a URL I got old invoice lists which was not even grated than 102630.
 
Does anyone know what's the problem here?
 
 
  • Community member Profile Picture
    Community member 72 on at
    problem in 'gt' filter while get invoices from business central API
    Hello YUN ZHU,
     
    I tried to use tenant id in API URL same as you provide below but still it's not working in my case.
     
    and its strange that 'gt' filet only not working with this customer account but we have other customer accounts where it's working properly.
     
    Do you think is it happened because of some changes has been done in BC by that customer?
     
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 75,942 Super User 2024 Season 2 on at
    problem in 'gt' filter while get invoices from business central API
    Hi, hope the following helps.
    My Test endpoint:
    https://api.businesscentral.dynamics.com/v2.0/c8558e71-6ad8-4fcd-9f29-3ca165b41bbe/Sandbox234/api/v2.0/companies(5c0ad51d-41bc-ee11-907c-6045bdacdef8)/salesInvoices?$filter=number gt '102198'
     
    Thanks.
    ZHU
  • Community member Profile Picture
    Community member 72 on at
    problem in 'gt' filter while get invoices from business central API
     
    still, it's not working.
     
    @Experts, kindly revert me if anyone know the solution.
  • Mohamed Amine Mahmoudi Profile Picture
    Mohamed Amine Mahmoudi 10,863 Super User 2024 Season 2 on at
    problem in 'gt' filter while get invoices from business central API
    Hi,
     
    try to remove the quotes on number value 
    number gt 102630
    Best regards,
    Mohamed Amine MAHMOUDI

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! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,476 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans