Get all attributes in FetchXML in Plugins | Dynamics 365 CRM [Quick Tip]

In Plugin development, when you use FetchXML while using RetrieveMultiple to retrieve data.

In some scenarios since you want to retrieve a large number of columns, so mentioning each column is cumbersome on not worth to save the extra processing. In that case, it’s better to retrieve everything.

Here’s a quick tip on how you can quickly retrieve everything in 1 tag in the FetchXML!


Creating FetchXML using Advanced Find

As a standard practice, just to revise – this is how you create FetchXML from Advanced Find.

  1. While working on Advanced Find, you click on Download Fetch XML

  2. This gives you an XML output of the FetchXML query which you can use in your plugins.

All Attributes

Here’s what you change in order to get all attributes –

  1. You remove all the marked columns as shown below

  2. And replace the <attribute> tags with <all-attributes />. Make sure no other <attribute name /> tags are included in combination with this <all-attributes /> tag.

Hope this was helpful! Here are some more Dynamics 365 posts which you might be interested in –

  1. Dynamics 365 Storage Utilization | Dataverse Storage | Power Platform Admin Center
  2. Use Hierarchy in Roll Up Fields in Dynamics 365 CRM
  3. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  4. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  5. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  6. Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
  7. Mailbox Alerts Hide/Show behavior in Dynamics 365 CRM
  8. Excel Importing Notes (Annotation) entity in Dynamics 365 CRM
  9. Enable/Disable the need to Approve Email for Mailboxes in Dynamics 365 CRM CE
  10. Call Azure Function from Dynamics 365 CRM using Webhooks
  11. Show Ribbon button only on record selection in Dynamics CRM
  12. Accessing multiple occurrences of a field in Business Process Flow using JS in D365 CRM

Thank you!!

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.