Questions tagged [fetchxml]

A proprietary query language used in Dynamics CRM. It can be used in Javascript, SSRS, and web services.

For more information please refer to Docs.

400 questions
4
votes
1 answer

How to combine multiple table results into one using FetchXml

I am using CRM 2013 Online. I want to generate a report on Opportunity entity like below: CampaignCode Open Opportunity Count Won Opportunity Count Lost Opportunity Count CC1 3 5 …
Indie.Dev
  • 134
  • 1
  • 12
4
votes
5 answers

FetchXML View to Include Attributes from Nested Link-Entity

I would like to have a view that show attributes from 3 entities: Statistics has a lookup to Account and Account has a lookup to Address. The view is on Statistics and I want attributes from all 3 entities; is this even possible? The problem is…
Bvrce
  • 2,170
  • 2
  • 27
  • 45
4
votes
1 answer

CRM 2011 Performing FetchXML group by on custom option set value

I want to be able to perform a FetchXML request that sums a value while grouping on a field that is a custom option set but I don't get the expected results. All that is returned is the summed up values, not the related custom option set value that…
Kelvin
  • 43
  • 1
  • 6
4
votes
4 answers

How to preform a relative complement query in CRM?

Background (ie what the heck is a relative complement?) Relative Complement What I'm trying to do Let's say I've got a custom Vehicle entity that has a VehicleType option set that is either "Car", or "Truck". There is a 1 to many relationship…
Daryl
  • 18,592
  • 9
  • 78
  • 145
3
votes
1 answer

Return NULLS in FetchXML

I am querying data from CRM 2011 using FetchXML to build a report in SSRS 2008. My query works, but it won't return records that link to a entity that is null. This is my Query:
user482375
3
votes
3 answers

Why isn't he fetchXml count attribute limiting the records returned?

I have a javascript function that adds a custom view to a control using fetchXML. My issue is that the count attribute on the root node is not working. I have it set to 6, but it's returning 26 records (all of the records), defined by the…
Daryl
  • 18,592
  • 9
  • 78
  • 145
3
votes
1 answer

Dynamics FetchXML condition checking text field beginning with pattern "xxABC"

In Microsoft Dynamics 365 FetchXML, is there a way to check a text field with the condition that it begins with "xxABC", where "xx" can be anything?
gymcode
  • 4,431
  • 15
  • 72
  • 128
3
votes
3 answers

How to pass null or empty to FetchXML filters?

Scenario: I've a text field in Dynamics CRM on Order Type. This field is integrated with some other systems and it'll be accepting only already stated list of values; like, ABC, IJK, XYZ etc. Now I can query this field using Advanced find if it…
Mohsin A.
  • 153
  • 2
  • 18
3
votes
1 answer

FetchXML Understanding Distinct

I am learning FetchXML and am currently new to it. I tried looking at the documentation located here but I did not find it very helpful What does this line mean:
3
votes
1 answer

Understanding Link-entity in FetchXML

I understand is used to do joins, but can you help me translate the following into english? *insert a bunch of attributes*
3
votes
1 answer

Left outer joins in FetchXML with multiple conditions

I'm trying to do a left outer join in FetchXML with multiple conditions. Here is the approximate SQL of what I'm trying to achieve: SELECT incident.*, externalCheck.* FROM incident LEFT OUTER JOIN externalCheck ON externalCheck.incidentId =…
Mark Micallef
  • 2,643
  • 7
  • 28
  • 36
3
votes
2 answers

Is that possible to make cast field in fetchxml?

Is that possible to make cast field from identifier to string in fetchxml? I have this query: select * from table1 t1 left outer join table2 t2 on t1.stringId=CAST( t2.id as varchar(40)) where t2.id is null and t1.childid is not null and this row…
3
votes
2 answers

How to implement custom FetchXML with aggregate as a System View in Dynamics365

I have a custom entity called course enrolment which has a lookup to the contact entity. I want to a view of contacts that have an active course enrolment. I don't believe that this can be done from the contact entity, so I have to create a view of…
madbrendon
  • 640
  • 1
  • 7
  • 19
3
votes
2 answers

When to specify PagingInfo.PagingCookie and PagingInfo.PageNumber

Though reading lots of available resources online, I couldn't find a straight explanation that clarifies: In what case both the values of PageingInfo.PageNumber and PageingInfo.PagingCookie are required to be assigned? For example: Consider we have…
OfirD
  • 9,442
  • 5
  • 47
  • 90
3
votes
2 answers

Request URL Too Long for fetchXml query types

I'm using CRM 2016 web api with fetchxml query parameter, but my query is too long it's simulate the IN operator were the number of parameters passed in the IN list are 300 elements and some times will be more than that. So my problem is the query…
1
2
3
26 27