web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
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 76
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?
 
 
I have the same question (0)
  • Mohamed Amine Mahmoudi Profile Picture
    26,767 Super User 2026 Season 1 on at
    Hi,
     
    try to remove the quotes on number value 
    number gt 102630
    Best regards,
    Mohamed Amine MAHMOUDI
  • Community member Profile Picture
    76 on at
     
    still, it's not working.
     
    @Experts, kindly revert me if anyone know the solution.
  • Suggested answer
    YUN ZHU Profile Picture
    97,376 Super User 2026 Season 1 on at
    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
    76 on at
    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?
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,042 Super User 2026 Season 1

#2
Dhiren Nagar Profile Picture

Dhiren Nagar 1,077 Super User 2026 Season 1

#3
YUN ZHU Profile Picture

YUN ZHU 1,068 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans