I'm encountering inconsistencies with FetchXML in Dynamics 365; it fails to load all the all attributes each time I run the query. Despite setting up FetchXML to filter and retrieve all attributes, it only returns a subset. Why is this ?

Namrata Zalewski (She/Her) 20 Reputation points
2024-06-26T05:05:57.9766667+00:00

Here is the query that I am using ADF copy activity:

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
  <entity name="@{item().tablename}">
    <all-attributes/>
    <filter type="and">
      <condition attribute="modifiedon" operator="ge" value="@{pipeline().parameters.start_date_par}" />
    </filter>
  </entity>
</fetch>
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,801 questions
Dynamics 365 Training
Dynamics 365 Training
Dynamics 365: A Microsoft cloud-based business platform that provides customer relationship management and enterprise resource planning solutions.Training: Instruction to develop new skills.
140 questions
{count} votes

Accepted answer
  1. phemanth 11,125 Reputation points Microsoft Vendor
    2024-07-03T10:29:40.09+00:00

    @Namrata Zalewski (She/Her) I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer

    . Ask I'm encountering inconsistencies with FetchXML in Dynamics 365; it fails to load all the all attributes each time I run the query. Despite setting up FetchXML to filter and retrieve all attributes, it only returns a subset. Why is this ?

    Here is the query that I am using ADF copy activity:

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"> <entity name="@{item().tablename}"> <all-attributes/> <filter type="and"> <condition attribute="modifiedon" operator="ge" value="@{pipeline().parameters.start_date_par}" /> </filter> </entity> </fetch>
    

    Solution: A possible solution might involve scripting to generate FetchXML with a comprehensive list of attributes. However, determining the necessary attributes for each entity could be challenging given the vast number of entities, each potentially having hundreds of columns. I managed to use the Dynamic CRM API to retrieve the metadata, and we'll explore if there's a method to selectively pull attribute lists based on specific properties.

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.


    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    Was this answer helpful?Yes

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.