Skip to main content

Notifications

Announcements

No record found.

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

$schemaversion=2.1 for nested functions using the Odata API

Posted on by 2

Hello everyone,

I'm using the following web address to request information from our Business Central instance, specifically to find a customer by name:
https:/api.businesscentral.dynamics.com/v2.0/{_businessCentralOptions.TenantId}/{_businessCentralOptions.Environment}/ODataV4/Company('{_businessCentralOptions.CompanyName}')/Customer

Currently, I use ?$filter=contains(Name, '{customerName}') to look up a customer based on a part of their name. However, I also want the search to be case-insensitive. According to this documentation: https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/use-filter-expressions-in-odata-uris, I should be able to achieve this by nesting tolower() and contains() like this: ?$filter=contains(tolower(Name), '{customerName}'), using schema version 2.1. But I'm having trouble figuring out how to use version 2.1, as changing it in the URL or in Business Central under Web Services doesn't seem to work.

 

 

Categories:
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,647 Super User 2024 Season 2 on at
    $schemaversion=2.1 for nested functions using the Odata API
    Hi, this is inherently case-insensitive if you use 'eq' method.
    For example,
    ?$filter=Name eq 'adatum corporation'
     
    Hope this helps.
    Thanks.
    ZHU

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans