Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
47 views

Pass variable into FetchXML via Javascript for Dynamics 365

I'll keep this concise as I find I ramble on too much if I don't. I've come up with the code below, but I believe I need to add it as an OnClick event for the Add Existing contact button. Can someone ...
Lycius's user avatar
  • 11
1 vote
1 answer
372 views

Dynamics 365 FetchXML nested link-entity, not-in

It's a long shot, but in FetchXML I have an entity with a many-to-many relationship with another table. In short, the Contact entity is linked with the ConnectionRole entity through an intermediary ...
Allan Bailey's user avatar
0 votes
1 answer
132 views

get the active fetchXML value of view from javascript

I am doing ribbon button for a view, the button should run an operation on each record the user sees. e.g. If the user applies the filters to show only records with condition fieldX = valueX so the ...
ayala's user avatar
  • 178
0 votes
1 answer
673 views

Filter lookup with fetchXML and special character '&' does not work

I am currently trying to filter a lookup field in Dynamics 365 CRM using a fetchXML in a javascript. I have to view all the products with a custom text field ('my_variantstatus') not equal to 'R&D ...
ThibC's user avatar
  • 1
0 votes
2 answers
494 views

How to convert this SQL query to Fetch XML?

Is it possible to write this SQL query as a Fetch XML query? http://www.sql2fetchxml.com fails to convert this query. select a.ownerid, b.call_count from opportunity a join ( select vsg_loan, count(*) ...
Arvind Gurumurthi's user avatar
1 vote
0 answers
92 views

FetchXml on Dynamics doesnt work on a specific user?

I've been struggling with a basic fetch and an inner join. I've tried the following: In the XRMtool FetchXML tester: the fetch works perfectly fine with some non-admin users, but not with others who ...
K M's user avatar
  • 11
3 votes
1 answer
520 views

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's user avatar
  • 4,603
0 votes
0 answers
702 views

"Object reference not set to an instance of an object" retrieving multiple records with IOrganizationService

I am creating a plugin for Dynamics 365 in C#. I am trying to make request using fetchXML, however I am getting the following error: Object reference not set to an instance of an object. Here is my ...
dwewers's user avatar
  • 69
1 vote
0 answers
313 views

How to convert this SQL Query to FetchXML Query for Power Automate Flow?

I'm looking for help in converting the SQL query below into a FetchXML Query. Background/Purpose: As part of building a PowerApps' Flow, I need to List Rows in Microsoft Dataverse (Dynamics 365 in ...
larsonist's user avatar
0 votes
0 answers
573 views

Dynamics (FetchXML) - Error: Aggregates are not supported

I'm fairly new to the FetchXML / Dynamics scene so please excuse my ignorance. Up until now I've been executing a PowerShell Script that runs a FetchXML query to obtain user most recent login dates ...
Burgtaro's user avatar
1 vote
1 answer
1k views

Difference between odata and fetchxml

I would like understand the difference between odata and fetchxml, this has to do with pagination in MS Dynamics, I am very new to the stack and would like to understand why there are two object ...
sgan11's user avatar
  • 21
0 votes
1 answer
703 views

Dynamics Portal Last Login of a Portal enabled Contact

I'm developing a MS Dynamics portal and I have my test contact authenticating (using Azure AD) into the portal but I can't find how to get the last (or any) date time the contact logged into the ...
James Marc O'Sullivan's user avatar
0 votes
1 answer
712 views

Dynamics crm fetchxml group by

I would like to have the total number of tasks for each user. For example, John Smith 562, Elsa Taylor 953, etc. I tried this fetchxml, but the result is just the total number of tasks: <fetch ...
Sean's user avatar
  • 969
0 votes
1 answer
2k views

How can I group by date using datetime field in FetchXML query

I have an entity in Dynamics CRM with attributes that look like this (just a small snippet): Date (datetime type) UserID (GUID type) Operation Entity 2020-09-24 00:47:08.000 ...
Tony's user avatar
  • 149
0 votes
1 answer
186 views

Unable to pull contacts with NO accounts tied using CRM SDK FetchXML

Using the below fetchxml, it is pulling contacts only that has account tied up. I want to pull contacts that has an account tied up [if so account name] and also contacts with no account tied up ...
SNew's user avatar
  • 111
0 votes
2 answers
2k views

How to dynamically change fetchxml filters in Dynamics Portal using Liquid templates?

Based on querystring I need to change FetchXML filters for dynamics portals using liquid. I tried below but it throws exceptin; Unknown tag 'endif'. Please help to make the filters dynamic. {% ...
Mohsin A.'s user avatar
  • 163
1 vote
2 answers
3k views

Fetch XML return option set value for Dynamics Portals liquid

I am trying to return an option set value / label to Dynamics portals site and struggling with the syntax, any help would be much appreciated. I cant get the optionset label to display which i what i ...
fairlo's user avatar
  • 11
1 vote
1 answer
2k views

FetchXml: get only records for which all related records satisfy the condition

Dynamics 365 v8.2. FetchXml. Each isv_entity1 record can be linked with one or more isv_entity2 records (one to many). I need to get only isv_entity1 records for which all linked isv_entity2 records ...
Andrey Bushman's user avatar
-1 votes
1 answer
230 views

Document Core Pack fetch

can anyone give me an Example of fetch Condition that i can used for the Document Core Pack fetchxml i use the DCP for a dynamics crm Template.
bnb's user avatar
  • 101
0 votes
1 answer
610 views

Execute XML xrmtoolbox for Dynamics 365 getting error "The given key was not present in the dictionary"

I want to create a view in my Dynamics 365 and I cant filter in the system so I use XRMToolBox to fetch the XML and customize it. So here is my code: <fetch version="1.0" output-format="xml-...
Aidel Ibrahim's user avatar
1 vote
1 answer
3k views

How to resolve Query Builder Error in custom filtering of Lookup field?

I have a contact lookup field in accounts and I have added a javascript for custom filtering. I am getting 0x80041103 Query Builder Error while clicking on the lookup. My fetchXML looks like : var ...
Madhan's user avatar
  • 11
0 votes
1 answer
4k views

Dynamics 365 FetchXML - Use IN operator for string

As I need to create a query where I need to add a filter condition where valid entitytype could be any from e1,e2,e3. For that I have currently written below FetchXML: <fetch version="1.0" output-...
I Love Stackoverflow's user avatar
0 votes
0 answers
238 views

FetchXML Return 0 records while running using C# Console Application

I've below code snippet when I run this through FetchXml Tester, I get one record in result which is correct. But when I run it using C# Console application it return 0 records. Any idea what is ...
Mohsin A.'s user avatar
  • 163
1 vote
2 answers
1k views

Can I use FetchXML to retrieve an entity by guid when object type not known?

I have an error log file that contains a GUID of an Entity in Microsoft Dynamics CRM 365 Online, but I do not know the Entity's object type. Is there a way of using FetchXML (or otherwise) to retrieve ...
Dave Potts's user avatar
  • 1,643
1 vote
1 answer
947 views

How to query a keyword on different attributes based on entity in fetchXML?

I have 2 entities in the database; an Appointment and an Email. I want to write a search function that fetches all Appointments and Emails that contains a string a user enters. However, I want to ...
chadb768's user avatar
  • 473
1 vote
1 answer
4k views

Microsoft Dynamics 365 can I use FetchXML to retrieve an entity by guid?

Given that I have a GUID and an Entity type, can I lookup the Entity using FetchXML? Why doesn't the following obvious seeming FetchXML work? <fetch> <entity name="user_entity" > &...
Dave Potts's user avatar
  • 1,643
0 votes
1 answer
358 views

What is the plugin message that triggered when Dynamics CRM FetchXml report executes

I created "Retrieve" and "Retrieve Multiple" CRM plugins on Dynamics CRM 2016 V8.2, to perform data decryption on one of the custom fields. This plugin works fine on List View, Advanced Find, Forms ...
waelsawy's user avatar
0 votes
2 answers
2k views

How to display MultiSelect Option Set in Dynamics 365 Web Portal with Liquid Template

I'm trying to display the selected values of a MultiSelect Option Set in a custom page in Web Portal with Liquid Template. I wrote the FetchXml query anf if i test it the query in XrmToolBox, it's ...
JSirius's user avatar
0 votes
0 answers
225 views

SSRS Fetchxml SubReport shows error when no Data is returned

I have a Main report and Sub Report. Passing parameter from Main Report to sub report,Sometimes Sub report have no Data and then my Sub Report shows error on main Report. When there is data from Sub ...
AnkUser's user avatar
  • 5,521
1 vote
1 answer
968 views

Left Join fetchXml based on common column

I have two tables that are not related, but have a common column. I want to join the rows in table B that match with <attribute name='substitutedproductid'> in Table A. Table A looks like this: ...
Alan Judi's user avatar
  • 1,092
2 votes
1 answer
3k views

Can I use FetchXML to retrieve a list of Entities and a list of Attributes?

I want a fetchxml that will return a list of Entities, hopefully with Display name and schema name. Similarly I would like a fetchxml that will return the attributes for an Entity. Also with Display ...
Mitchell M's user avatar
0 votes
1 answer
945 views

fetchXml Dynamics 365 with sorting on link entity and paging working only for first page, not others

following query is working fine for first page <fetch count="10" no-lock="true" page="1"> <entity name="account"> <attribute name="accountid" /> <attribute ...
sangram parmar's user avatar
0 votes
3 answers
2k views

Retrieve all related activites of an account - Dynamics CRM

I would like to get rid of the Social Pane on Dynamics 365, by replacing it with a Subgrid on the account form which would list the activities of the account and the activities of the account's ...
Hubert Solecki's user avatar
1 vote
1 answer
865 views

Fetch XML returns 0 records where there is no related field

I'm using FetchXML to retrieve some field values for a few given IDs. The problem is that if I request a related field, and that field does not have a value, no records are returned. For example, ...
Glenn Wilson's user avatar
2 votes
1 answer
2k views

System.InvalidCastException ("Specified cast is not valid.") in a FetchXML query for an OptionSet Attribute

I am trying to retrieve the numeric value of each OptionSet returned by a FetchXML Query. The value retrieved is aliased and I want to cast the aliased value into an integer and store each value into ...
Alan Judi's user avatar
  • 1,092
1 vote
3 answers
1k views

What does EntityCollection return if FetchXML (AGGREGATE SUM) Query didn't find anything?

I am running a FetchXML query (aggregate='true' for the fetch and aggregate='sum' for all attributes) and passing it to RetreiveMultiple in my C# plugin code. What if the Fetchxml didn't find anything,...
Alan Judi's user avatar
  • 1,092
1 vote
2 answers
1k views

FetchXML Localization

I have a FetchXML Query that returns the correct entities for my portal. How do I get the translated values stored in my CRM <fetch version="1.0" output-format="xml-platform" mapping="logical" ...
KidCoke's user avatar
  • 307
0 votes
1 answer
324 views

Receiving System.FormatException: Index (zero based) when adding values to a string for Fetch XML

I am building a fetch XML string including a paging cookie, completing an update on the records on the page and moving on to the next. I build the fetch with the following: Fetch ...
teedubya's user avatar
0 votes
1 answer
2k views

D365 C# - Retrieve Multiple and Updating Very Slow

I'm building a console that connects to a D365 instance, finds records using fetch XML and updates those records with a specific value. It works, it is updating the records. However, it is only ...
teedubya's user avatar
1 vote
2 answers
5k views

handling special characters in fetch xml

I need to Manage the 'AccountText' variable, so if I'am passing a value with special characters for exemple "MC&CO", I should not get an error. var fetchXml = "<fetch version='1.0' output-...
fnando's user avatar
  • 43
2 votes
1 answer
1k views

Execution of Fetch XML using Web API Dynamics 365

I am using this approach for paging using Fetch XML within Web API. Web API works perfect when we use simple fetch and it returns paging cookie along with results if there are more records but when we ...
Ehsan Aslam's user avatar
0 votes
1 answer
1k views

'System.ServiceModel.FaultException`1' when using RetrieveMultiple with FetchXML in Dynamics CRM

I am consistently getting the above error when attempting to get results from a FetchXML query. Any help would be appreciated. The error always occurs on the line: EntityCollection ...
Jason James's user avatar
1 vote
1 answer
3k views

How to display contacts for account and sub-account in Dynamics CRM

I am sharing this because it took me forever to find a good way to display all contacts for a parent account and all it's sub-accounts. So that when looking at a child account it will show only ...
Bug Maker's user avatar
  • 505
0 votes
2 answers
389 views

FetchXml group by different values

I want to count Status Reason on Case entity. But I don't know how to group by as shown bellow. I was looking around but couldn't find anything useful. ------------------------------------ ALIAS ...
Matjaž's user avatar
  • 2,115
0 votes
1 answer
1k views

Attribute type "Virtual" is not supported. Remove attribute "XYZ" from the query, and try again

I'm converting SQL to FetchXml for migrating existing reports in Dynamics CRM 2013 to Dynamics CRM 2015 online. There is an optionset and ran into this issue that The attribute type "Virtual" is not ...
A.K's user avatar
  • 505
4 votes
1 answer
7k views

Unable to get "Microsoft Dynamics CRM Fetch" in Data Source options for SSRS reports project for CRM 2015

I have a problem very similar to this post I have installed "Microsoft Dynamics CRM Report Authoring Extension" for Dynamics CRM 2015. Installed BIDS for Sql Server 2012 and working with VS 2013 ...
A.K's user avatar
  • 505
0 votes
2 answers
4k views

FetchXML - Today - minus 30 days

I am attempting to create a FetchXML script that retrieves records with a date of today minus 30 days. Below is the SQL that works. Could somebody help me with the FetchXML, please? SELECT * FROM [...
Richard Butterwood's user avatar
0 votes
1 answer
2k views

DynamicsCrm - Retrieve Multiple is not supported

I´m developing a data-extraction tool that gets data out of DynamicsCrm. I have a few tables tough where i get the following exception: Additional information: The 'RetrieveMultiple' method does not ...
kamahl's user avatar
  • 941
0 votes
1 answer
2k views

FetchXML issues with aggregate groupby on an option field

I am having issues with a FetchXML query running against Dynamics CRM 2013 (online). When running this simple query <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="...
PAB's user avatar
  • 51
1 vote
1 answer
645 views

Left outer join in CRM 2013

Is it possible to create a fetchxml/query expression/LINQ expression in Dynamics CRM 2013 that will return all parent entities that don't have a child entity with an attribute set to a specific value? ...
user3614415's user avatar