Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 2 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
I need to retrieve a set of records based on a search on two different fields in two different entities. The search value can exist in either field for the record to be returned. Do I have to use FetchXML for this? I tried variations on the below for this with no luck.
jobopportunities?$select=createdon,_account_value,addcoresafety,directions,duration,jobaddress,jobtype,_list_value,name,neededemployees,positiontitle&$expand=account($select=name;$filter=contains(name, 'foo'))&$filter=contains(positiontitle, 'foo')
afaik not possible directly with a single query, you can eventually get all the records from a query where the condition is on the secondary entity (like the account name on your query) and after filter the result checking if your first condition is applied or not on your primary entity.
EDIT: thinking again, probably you will need to do a query getting all the results (so no conditions on the secondary entity, just retrieve all the records) and after check both conditions. I am talking when there is a relationship that connect both entities (like "jobpportunity" and "account" in your example query) and this relationship is bound to the records you want to retrieve (just to clarify, if you want to check accounts with your condition that are not related to jobopportunity, then you must do two separate queries)
hope it helps and sorry for the confusion.
Business Applications communities