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 :
Customer experience | Sales, Customer Insights,...
Answered

Searching via FetchXML Query

(0) ShareShare
ReportReport
Posted on by 25

Hi,

I am attempting to incorporate some search functionality in my application which queries the Dynamics REST API using FetchXML.

I have found that when attempting to perform search it works fine on non-lookup fields but I am able to search on lookup fields (i.e. on the incidents entity, statuscode like %case created%). It looks like in this case the like is performed against the numerical statuscode as opposed to the display string (i.e. Case Created).

How can I perform search on lookup fields?

Regards,
Andy

I have the same question (0)
  • Verified answer
    Flydancer Profile Picture
    1,332 on at

    You can't. If you want to filter by statuscode, you have to use the statuscode instead of the label.

    If you need to "find" the statuscode by name you can use something like:

      
        
          
          
          
        
      
    

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans