Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Unanswered

Filter for fields that may have spaces via Web API

Posted on by 5

Hello,

 I'm trying to get customer details based on his telephone number via WEB API

The following example is successful because the number in CRM is formatted with spaces:

GET /api/data/v9.1/contacts?$filter=contains(mobilephone, '+41 12 345 67 89')&$select=fullname

 The problem is that the numbers doesn't have a fixed format.. sometimes they are +41123456789 and some times they have spaces in between. All combinations are possible.

 Do you know how should I format my filter to include all format possibilities?

Thank you,

Mihai

  • Mihai V Profile Picture
    Mihai V 5 on at
    RE: Filter for fields that may have spaces via Web API

    I have answered my question alone after some more searching. I put % between all digits like %+%4%1%1%2%3%4%5%6%7%8%9% and it seems it works.

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans