web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Retrieve - ODATA

(0) ShareShare
ReportReport
Posted on by 694

Good afternoon,

We are running a query using $ filter, with a parameter and it is working, however need to insert the AND clause because we will use several parameters ... how do we proceed?

Follow the code that we are using

$ Filter = order_customer_accounts / Name% 20eq% 20% 27ACCOUNT% 27 & AND
$ Filter = order_customer_accounts / Name% 20eq% 20% 27ACCOUNT2% 27% &

Thank you

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    tw0sh3ds Profile Picture
    on at

    Hi,

    I would suggest using some tool for building queries for example:

    github.com/.../CRMRESTBuilder

    I'm not sure what;s the problem with this and clause. And clause in filter is just "and" :) sor for example:

    filter=Country_Region_Code eq 'ES' and Payment_Terms_Code eq '14 DAYS'

  • Suggested answer
    Alagunellaikumar Profile Picture
    6,212 on at

    Hi Ricardo,

    Correct one is $ Filter = order_customer_accounts / Name% 20eq% 20% 27ACCOUNT% 27 & AND

    Please refer below link,

    msdn.microsoft.com/.../gg309461(v=crm.7).aspx

  • Ricardo Rodrigues dos Santos Profile Picture
    694 on at

    Tank you,

    And after the end would be the second account?

  • Suggested answer
    Alagunellaikumar Profile Picture
    6,212 on at

    $ Filter = order_customer_accounts / Name% 20eq% 20% 27ACCOUNT% 27 & AND order_customer_accounts / Name% 20eq% 'second account name '

  • Suggested answer
    Alagunellaikumar Profile Picture
    6,212 on at

    Hi

    If you got answer.Could you please close the thread?

  • Ricardo Rodrigues dos Santos Profile Picture
    694 on at

    Hello Alagu,

    Tanks for your answer.

    Inflectively is bringing only the data of the first account does not bring the data of the second.

  • Suggested answer
    JohnAnonymous Profile Picture
    5,241 on at

    Shouldn't it be OR in stead of AND if you want to bring back two records and filter on the same property?

  • Ricardo Rodrigues dos Santos Profile Picture
    694 on at

    I did not understand, could you give me an example or be clearer please?

  • Verified answer
    tw0sh3ds Profile Picture
    on at

    Hi Ricardo,

    You were asking how to put multiple parameters using AND clause and you got your answer. It's really hard to understand your question now - why are you getting only one account? Because only one account satisfied your conditions that you've put in the query. You did not explain what you want to achieve or shared with us some data example that you want to query for, so I'm guessing that you should close this thread and start new one not to make chaos on the forum with too long topics having multiple different questions inside.

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

News and Announcements

[Smoke test 2510.1]

Quick Links

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans