web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    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.

  • Rozpalacz Profile Picture
    10 on at

    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?

  • Suggested answer
    ajyendra Profile Picture
    1,738 on at

    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
    10 on at

    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"

  • ajyendra Profile Picture
    1,738 on at

    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

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans