web
You’re offline. This is a read only version of the page.
close
Skip to main content
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,316 Super User 2025 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
  • Community member Profile Picture
    76 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.
  • Suggested answer
    YUN ZHU Profile Picture
    92,576 Super User 2025 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
    76 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?
     

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 4,160

#2
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 2,943

#3
Sumit Singh Profile Picture

Sumit Singh 2,823

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans