FetchXML Studio — User Guide
Overview
FetchXML Studio is a full-featured query editor for Dataverse FetchXML. Write or build queries visually, execute them with pagination support, view results in a sortable table, and export to CSV, Excel, or JSON.
Prerequisites
- An active connection to a Dataverse environment
- Read access to the tables you intend to query
Getting Started
- Select FetchXML Studio from the sidebar
- The editor opens ready for input — the current environment is shown in the header
Interface Layout
| Area | Description |
|---|---|
| Toolbar | Recent queries, Clear, Format, and Run Query buttons |
| Editor | FetchXML textarea with line numbers |
| Results | Sortable data table with export controls |
Workflow
1. Write or Build a Query
Manual editing:
Type or paste FetchXML directly into the editor. Example:
<fetch top="50">
<entity name="account">
<attribute name="name" />
<attribute name="emailaddress1" />
<filter>
<condition attribute="statecode" operator="eq" value="0" />
</filter>
</entity>
</fetch>
Visual builder tab:
Switch to the Builder tab to construct queries without writing XML:
- Select an entity from the dropdown
- Check the fields to include
- Add filter conditions using the condition builder
- Switch back to the XML tab to review or fine-tune the generated FetchXML
2. Format the XML
Click Format or press Alt+Shift+F to auto-indent and pretty-print the XML. Formatting also validates the XML — malformed XML will be highlighted.
3. Run the Query
Click Run Query or press Ctrl+Enter.
- Queries are automatically paginated — up to 5,000 rows are fetched
- Execution time (ms) and row count are displayed above the results table
- A warning banner appears when results are truncated at the 5,000 row limit
4. Work with Results
| Control | Action |
|---|---|
| Column header click | Sort ascending / descending |
| Formatted values toggle | Switch between raw values and Dataverse display labels |
| Column visibility | Show/hide individual columns from the dropdown |
Note: The table displays the first 500 rows. Use Export to access all fetched rows.
5. Export
Select a format and click Export:
| Format | Content |
|---|---|
| CSV | UTF-8 with BOM, RFC 4180 compliant |
| Excel | Two sheets: query metadata + full results |
| JSON | Pretty-printed with query and environment metadata |
6. Query History
Click Recent to see the last 10 queries run against this environment. Each entry shows the entity name, row count, and how long ago it was run. Click an entry to load it back into the editor.
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl+Enter |
Run query |
Alt+Shift+F |
Format XML |
Tab |
Insert 2 spaces |
Tips
| Tip | Detail |
|---|---|
Use top attribute |
Add top="100" while testing to keep queries fast |
| Formatted values | Enable the toggle to see option set labels and lookup display names instead of codes |
| Save frequently used queries | Copy important queries to a text file — history holds only the last 10 per environment |
| Pagination is automatic | No need to write paging cookies — the plugin fetches all pages up to the 5,000 row limit |
Troubleshooting
| Problem | Resolution |
|---|---|
| "Invalid XML" on format | Check for unclosed tags or missing quotes in attribute values |
| 0 rows returned | Verify the entity name and filter conditions — try removing the filter first |
| Results cut off at 5,000 | Add a top attribute or use $filter to narrow the dataset before exporting |
| Column missing from results | Confirm the attribute name is the logical name, not the display name |