Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

API GET - to many records fetched

(0) ShareShare
ReportReport
Posted on by 10

Hi,

I use filter in API GET get fetch data:

api.crm4.dynamics.com/api/data/v9.1/new_groups?$filter=new_code eq 'LINA'

but I get two records with: LINA and with LINÄ   - different is one character: A and Ä

Is there any possibility to get only one record with exact phrase "LINA" ?

*This post is locked for comments

  • ajyendra Profile Picture
    ajyendra 1,732 on at
    RE: API GET - to many records fetched

    Hi,

    Did u find the solutions? if not then I suggest that you can filter out the Data of "LINA" after your web API response. After Response You can Check if the new_code is "LINA" or "LIN\u00c4" 

    Thanks

    Ajyendra

  • Rozpalacz Profile Picture
    Rozpalacz 10 on at
    RE: API GET - to many records fetched

    I use encodeURIComponent :) but only for readable I put link in this way. But it still not work.

    Still get two records for 'LINA in JSON'

    "new_code":"LIN\u00c4"

    and second

    "new_code":"LINA"

  • Suggested answer
    ajyendra Profile Picture
    ajyendra 1,732 on at
    RE: API GET - to many records fetched

    Hi,

    use var str = encodeURIComponent('LINA');

    "api.crm4.dynamics.com/api/data/v9.1/new_groups?$filter=new_code eq"+ str;

    It works for me.

    Hope it helps

    Thanks

    Ajyendra

    If this answer is helpful. Please Mark as Verified.

  • Rozpalacz Profile Picture
    Rozpalacz 10 on at
    RE: API GET - to many records fetched

    1. $top=1 - it will not solve a problem. I need exactly one record with exactly the same value that is set in filter

    2. Tried with "Accept-Language" = en-US and with sv-SE but still get two records. So there is no option to set in query that API can consider A and Ä and return exactly records from filter?

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: API GET - to many records fetched

    There are a couple of things that you can do (or try). The first of course is the easiest is adding a top parameter to the query: $top=1.

    Another option (and this is something you would have to test out), is to add a request header "Accept-Language" and set it to en-US.

    There might be other options, but you can try this out.

    Hope this helps.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,489 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans