A powerful, modern FetchXML query builder and data explorer for Microsoft Dataverse and Dynamics 365.
npm install @mohsinonxrm/pptb-fetchxml-studio
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β [Entity Selector βΌ] [Load View βΌ] [Save View] [β Settings]β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β [FetchXML] [LayoutXML] [Results] [βΆ Execute]β
β Query Tree ββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β β
β π fetch β Results Grid / Monaco Editor β
β ββπ entity β β
β ββπ attribute β ββββββββββββββ¬βββββββββββββ¬βββββββββββββββ β
β ββπ attribute β β Column 1 β Column 2 β Column 3 β β
β ββπ½ order β ββββββββββββββΌβββββββββββββΌβββββββββββββββ€ β
β ββπ filter β β Value β Value β Value β β
β β ββ condition β β Value β Value β Value β β
β ββπ link-entityβ ββββββββββββββ΄βββββββββββββ΄βββββββββββββββ β
β β β
ββββββββββββββββββββββββ€ [β Prev] Page 1 of 10 [Next βΆ] 100 records β
β β β
β Properties Panel β [+ Add Columns] [β Edit Columns] [β¬ Export] β
β (context-aware) β [π Delete] [Bulk Delete] [β‘ Run Workflow] β
β β β
ββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββ
`
π Getting Started
$3
- Power Platform ToolBox desktop application
- Connection to a Dataverse environment
$3
FetchXML Studio is available as a tool in Power Platform ToolBox. Install it from the tool gallery or load as a custom tool.
π οΈ Development
$3
`bash
Clone the repository
git clone https://github.com/mohsinonxrm/pptb-fetchxml-studio.git
cd pptb-fetchxml-studio
Install dependencies
npm install
Start development server
npm run dev
`
$3
`bash
Production build
npm run build
Preview production build
npm run preview
`
$3
Enable debug logging in the browser console:
`javascript
// Enable specific category
enableDebug("metadataAPI"); // API calls and responses
enableDebug("treeExpansion"); // Tree node operations
enableDebug("relationshipPicker"); // Relationship loading
enableDebug("linkEntityEditor"); // Link-entity configuration
enableDebug("propertiesPanel"); // Property editor routing
// Enable all
enableAllDebug();
// Disable
disableDebug("metadataAPI");
disableAllDebug();
`
π¦ Tech Stack
| Technology | Purpose |
|------------|---------|
| React 19 | UI framework with latest features (transitions, actions) |
| TypeScript 5.9 | Type-safe development |
| Vite | Fast build tooling and HMR |
| Fluent UI v9 | Microsoft's design system (Tree, DataGrid, Tabs, etc.) |
| Monaco Editor | VS Code's editor for XML editing |
| react-window | Virtualized list rendering for large datasets |
| exceljs | Native Excel file generation |
| @pptb/types | Power Platform ToolBox API types |
π Project Structure
`
src/
βββ app/
β βββ AppShell.tsx # Main layout with split panes
βββ features/fetchxml/
β βββ api/
β β βββ pptbClient.ts # Dataverse API wrapper
β β βββ dataverseMetadata.ts # Metadata fetching
β β βββ excelExport.ts # Excel export logic
β β βββ formattedValues.ts # OData formatted value handling
β βββ model/
β β βββ nodes.ts # TypeScript node definitions
β β βββ fetchxml.ts # FetchXML generation
β β βββ fetchxmlParser.ts # FetchXML parsing
β β βββ layoutxml.ts # LayoutXML generation
β β βββ operators.ts # Operator definitions by type
β βββ state/
β β βββ builderStore.tsx # React context state management
β β βββ cache.ts # Metadata caching
β βββ ui/
β βββ LeftPane/ # Tree view and properties
β βββ RightPane/ # Tabs, editor, grid
β βββ Toolbar/ # Entity selector, view picker
β βββ Dialogs/ # Delete, bulk delete, workflow
β βββ Settings/ # Display preferences
βββ shared/
βββ components/ # Reusable pickers
βββ hooks/ # Custom React hooks
βββ utils/ # Debug utilities
`
π§ FetchXML Features Support
| Feature | Status |
|---------|--------|
| Basic queries | β
|
| Attributes (select columns) | β
|
| All-attributes | β
|
| Filters (and/or) | β
|
| Nested filters | β
|
| All condition operators | β
|
| Link-entity (joins) | β
|
| Inner/outer joins | β
|
| N:N relationships | β
|
| Orders (sorting) | β
|
| Multi-column sort | β
|
| Aggregate queries | β
|
| Groupby | β
|
| Distinct | β
|
| Top/Count | β
|
| Paging with cookies | β
|
| Value-of conditions | β
|
| Entity name on conditions | β
|
| Filter link-entity (any/all) | β
|
| Query hints | β
|
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
1. Fork the repository
2. Create your feature branch (git checkout -b feature/amazing-feature)
3. Commit your changes (git commit -m 'feat: add amazing feature')
4. Push to the branch (git push origin feature/amazing-feature)
5. Open a Pull Request
$3
This project follows Conventional Commits:
- feat: New feature
- fix: Bug fix
- refactor: Code refactoring
- docs: Documentation
- chore:` Maintenance