Breaking news from around the world
Get the Bing + MSN extension
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
2019 release wave 2 Discover the latest updates and new features to Dynamics 365 planned through March 2020
Release overview guides and videos Release Plan | View 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 | Talent TechTalks | Upcoming TechTalks
I have a FetchXML query that works in an SSRS report but fails in the Advanced Find. (CRM 2016 On Premise) I am using the View Designer within the XRMtoolbox tool.
I am starting at the Activity and bringing in all Contacts that are equal to an attribute on the contact form. Good so far. I then want to add any opportunity related to those contacts where the parent is the Contact record. I can display the results in the query window just fine. I can run this in an SSRS just fine. It just won't run in the Advanced Find in CRM.
I am unsure what is wrong unless the View Designer is not saving to CRM correctly?
Here is what happens when I display columns on the advanced find add columns window. Entire Fetch below.
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" count="50" >
<entity name="activitypointer" ><attribute name="activitytypecode" /><attribute name="subject" /><attribute name="statecode" /><attribute name="prioritycode" /><attribute name="modifiedon" /><attribute name="activityid" /><attribute name="instancetypecode" /><attribute name="community" /><attribute name="createdon" /><attribute name="regardingobjectid" /><attribute name="ownerid" /><order attribute="modifiedon" descending="false" /><link-entity name="contact" from="contactid" to="regardingobjectid" alias="ax" ><attribute name="address1_postalcode" /><attribute name="parentcustomerid" /><attribute name="lastname" /><attribute name="sl_isvip" /><attribute name="telephone2" /><attribute name="fullname" /><attribute name="firstname" /><attribute name="sl_issrexecutive" /><attribute name="emailaddress1" /><attribute name="address1_city" /><attribute name="telephone1" /><filter type="and" ><condition attribute="new_KeyFieldForContact" operator="not-null" /></filter><link-entity name="opportunity" from="parentcontactid" to="contactid" alias="ai" visible="true" ><attribute name="campaignid" /><attribute name="new_verbaltotal" /><attribute name="sl_opportunitytype" /><filter type="and" ><condition attribute="campaignid" operator="not-null" /></filter></link-entity></link-entity></entity></fetch>
Can you please provide layout xml? I believe you have wrong alias used inside. Try to replace that column you have issues with with ai.sl_opportunitytype.
Hi Andrill, my XML is in the post unless what I provided is not what you need?
remove that column and add it again (not from FetchXml, but from the columns - modify that view right in CRM.. btw, that's what Andrii was implying, I believe). It seems you have changed the alias in that fetch along the way, so it's still trying to find that numeric alias, and you have it as "ai" now.
Yes, I tried that but when I put the columns back they don't display the data in the Advanced Find. I am looking for all Activities related to Contacts and Opportunities from 3 different views. I can get the activities and contact columns to display but when I add the opportunity columns they do not display.
It works in an SSRS report but the Advanced Find does not seem to like they way the XML query is formatted.
Normally, advanced find can only go two levels deep (as far as columns are concerned) - columns from the main and related entities can be displayed, but you can't go beyond that.. maybe that's the problem, since you are trying to display an attribute from the "3d" level..
Not sure if that would work for you, but you might try to start from the "contacts" and link opportunities/activities to the contacts.
PS. Either way, the reason you are getting that original error is because there is a different alias/column name now, so it has to be updated this way or another..
Alex - Thanks, it is a 3rd level entity issue. I just thought I could sneak by with a FetchXML imported back in to the Advanced Find. I can pull an SSRS report and everything displays as needed.
That will have to do for my users, just trying to go above and beyond for them with this one..:)
Business Applications communities