Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

Fetching OData query filters on the page exposed as web service

(1) ShareShare
ReportReport
Posted on by 55
Greetings,
 
we currently have a page which loads data into the temporary record every time page is opened (this is required since data dynamically changes all the time and we can't keep everything permanently in actual DB table).
 
Our client requested from us to open this page as API endpoint, which we did through  "Web Services" BC page. Issue is now that API response is slow since data is loaded into the temp. record every time API call is made. We can send the OData query filters, but they are only applied AFTER data is loaded into the temp. record.
 
Is there any way we can fetch those filters on page in code as soon as request arrives? We would like to get those filters and then set the filters on our own before loading of the data into the temp. table stars.
 
For example, let's say we have next URL with filters: 
  • https://api.businesscentral.dynamics.com/v2.0/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Client-Environment/ODataV4/Company('SomeCompany')/OpenQuantitiesOverview?$filter=Location_Code eq '61-ZAGREB'
 
Can we fetch the value '61-ZAGREB' directly on the page?
 
Thank you.
  • YUN ZHU Profile Picture
    81,789 Super User 2025 Season 1 on at
    Fetching OData query filters on the page exposed as web service
    In addition to the API, I think the performance may be greatly improved if you use Query.
    And obviously your logic when the page is opened is very complicated. So in your case, it is not recommended to use temporary tables, as this will generate data from scratch each time. You can save the data on a real table and then modify this table each time. But if your logic is too complicated, it may be the same, anyway, you can try it.
     
     
    Hope this can give you some hints.
    Thanks.
    ZHU
  • Valentin Castravet Profile Picture
    27,891 Super User 2025 Season 1 on at
    Fetching OData query filters on the page exposed as web service
    Create an API page, its much faster than a regular page exposed as a web service. 
     
  • Gerardo Rentería García Profile Picture
    17,772 Most Valuable Professional on at
    Fetching OData query filters on the page exposed as web service

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,261 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,013 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans