@mohsinonxrm/pptb-fetchxml-studio 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +598 -0
- package/README.md +89 -25
- package/dist/assets/index-BQgTOj7B.js +107 -0
- package/{icons → dist/icons}/icon.svg +1 -1
- package/dist/index.html +1 -1
- package/package.json +17 -13
- package/dist/assets/index-BoFrKby3.js +0 -107
- package/icons/icon-insider.svg +0 -16
- package/npm-shrinkwrap.json +0 -6362
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,604 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.4.1] - 2026-10-17
|
|
11
|
+
|
|
12
|
+
The v1.4.1 milestone: correctness against Dataverse, a complete properties panel, and the open bugs. It was iterated through `1.4.1-beta.1` to `1.4.1-beta.20` (detailed below). Every behaviour was checked against Microsoft Learn and a live Dataverse environment: valid FetchXML is never refused, only queries Dataverse rejects are blocked, and warnings are reserved for what can't be determined.
|
|
13
|
+
|
|
14
|
+
### ✨ Added
|
|
15
|
+
|
|
16
|
+
- **A complete, metadata-driven properties panel (#90b).** Every node type has an editor covering the FetchXML reference, with info popovers linking to the docs. Tree badges show link types, aggregates and other options at a glance.
|
|
17
|
+
- **Lossless Parse to Tree (#90a).** Every documented FetchXML attribute round-trips, as do unknown, namespaced and legacy attributes. All 60 Microsoft Learn FetchXML examples round-trip without loss. When Parse to Tree would remove or correct something, it asks first and lists the changes (#89).
|
|
18
|
+
- **Validation that matches Dataverse (#48, #89, #90b, #94, #87).**
|
|
19
|
+
- Errors are only for queries Dataverse rejects; notes never block.
|
|
20
|
+
- Every rule was verified live.
|
|
21
|
+
- Valid but unusual FetchXML (e.g. SQL 4 CDS's `xmlns:generator`, or `link-type="natural"`) is accepted.
|
|
22
|
+
- **Condition operators per attribute (#87).**
|
|
23
|
+
- The operators offered follow a live operator × attribute-type matrix.
|
|
24
|
+
- Value inputs match each operator: whole numbers for "x" operators, a fiscal period plus year, `between`, lists.
|
|
25
|
+
- The four documented fiscal "x" operators were added.
|
|
26
|
+
- **Many-to-many joins (#85).** An N:N relationship joins through its intersect entity, as documented. Intersect entities (`systemuserroles`, `teammembership`, …) can be joined to each side of their N:N relationship (#57).
|
|
27
|
+
- **Paging and Retrieve All (#58, #60).**
|
|
28
|
+
- The documented paging cookie is used, with page-number paging when Dataverse returns none.
|
|
29
|
+
- Views follow `@odata.nextLink` past 5,000 rows.
|
|
30
|
+
- **Stop** keeps the rows already loaded, and a failed page shows a message with **Retry**.
|
|
31
|
+
- **Advanced Find Only applies everywhere (#57).** It applies to entities, attributes and relationships in every entity scope. With it off, FetchXML Studio builds queries Advanced Find can't: system and customization entities, intersect entities, and hidden attributes and relationships. Unreadable attributes are never offered.
|
|
32
|
+
- **Select Attributes (#52):** a wider dialog with resizable columns, one-line cells, a type filter, "Selected only" and a selection count.
|
|
33
|
+
|
|
34
|
+
### 🔧 Fixed
|
|
35
|
+
|
|
36
|
+
- **Root entity and record IDs (#54, #59).** The root entity is detected correctly, and FetchXML is never modified: no primary key is injected.
|
|
37
|
+
- **FetchXML runs against the entity's real Web API entity set name (#61).**
|
|
38
|
+
- **Editor mode (#102).** Execute, Save and Send to Tool run exactly what's in the editor.
|
|
39
|
+
- **Escaping and aliases (#63, #94).**
|
|
40
|
+
- Every generated value is escaped, and apostrophes stay literal for Power Automate.
|
|
41
|
+
- Corrected aliases update their references.
|
|
42
|
+
- The Intellisense, Power Automate and Web API snippets follow the docs.
|
|
43
|
+
- **Results grid columns (#114).**
|
|
44
|
+
- Edit / Add columns and header sorting write valid FetchXML for aliased and link-entity columns and aggregate queries.
|
|
45
|
+
- Columns of link-entities without an alias show in the grid.
|
|
46
|
+
- **Parse to Tree, files and views keep their query (#57).** Changing the publisher or solution selection never clears the query.
|
|
47
|
+
- **Selecting a new link-entity no longer crashes the app.**
|
|
48
|
+
- **Dark theme (#67)** covers the whole tool and follows PPTB's theme live, including System.
|
|
49
|
+
- **Link-entities (#86, #88):** switching to not any / not all keeps filters, and "None" is never written as a value.
|
|
50
|
+
- **The "+ New" button** is no longer covered by the entity box in a narrow pane (#53).
|
|
51
|
+
- **The tool icon** is bundled under `dist/` and fills PPTB's icon slot (#62, #121). It shows in PPTB once PowerPlatformToolBox/desktop-app#738 ships.
|
|
52
|
+
|
|
53
|
+
### 🏗️ Technical
|
|
54
|
+
|
|
55
|
+
- **Dependencies:** Fluent UI React v9 upgraded to 9.74.9 (#104), and `package-lock.json` is committed.
|
|
56
|
+
- **Tests and lint:** Vitest with 507 tests (#64). Lint passes with zero warnings and runs as `eslint . --max-warnings=0` (#65).
|
|
57
|
+
|
|
58
|
+
## [1.4.1-beta.20] - 2026-10-17
|
|
59
|
+
|
|
60
|
+
### 🔧 Fixed
|
|
61
|
+
|
|
62
|
+
- **The tool icon looked small in PPTB (#121).** PPTB draws tool icons in a 20×20 box, but the hexagon only filled 56×48 of the icons' 64×64 canvas, so it showed at about 17×15 px.
|
|
63
|
+
- Both icons (`icon.svg` and the Insider `icon-insider.svg`) now crop their `viewBox` to the hexagon: `4 8 56 48`. They draw at about 20×17 px.
|
|
64
|
+
- The artwork is unchanged; no shape or stroke falls outside the new box.
|
|
65
|
+
- The build still emits the right variant to `dist/icons/icon.svg`, and `pptb-validate` passes.
|
|
66
|
+
|
|
67
|
+
## [1.4.1-beta.19] - 2026-10-17
|
|
68
|
+
|
|
69
|
+
### 🔧 Fixed
|
|
70
|
+
|
|
71
|
+
Lint is clean: `npm run lint` now runs `eslint . --max-warnings=0` and passes with zero warnings (#65). The hook-dependency warnings were fixed rather than suppressed, and two of them were real bugs:
|
|
72
|
+
- **The Code tab's Web API snippet could show a stale entity set name.** The snippet didn't update when the entity set name finished loading.
|
|
73
|
+
- **Loading FetchXML from a file could report through a stale editor callback.** That handler didn't list the callback as a dependency.
|
|
74
|
+
|
|
75
|
+
### 🏗️ Technical
|
|
76
|
+
|
|
77
|
+
- `builderStore.tsx`: the builder's actions are created once (`dispatch` never changes), and the context value is memoized on the state. Consumers can list builder actions as hook dependencies, and they only re-render when the builder's state changes.
|
|
78
|
+
- `AppShell.tsx`:
|
|
79
|
+
- the layout sync effect lists `syncLayoutWithFetchXml`, which is now stable;
|
|
80
|
+
- the 1:N / N:N check uses `LinkEntityNode[]` instead of `typeof builder…`;
|
|
81
|
+
- record deletes re-run the query through a ref to the latest `handleExecute`, called after the `await`, instead of a version captured when the callback was created.
|
|
82
|
+
- `CodePanel.tsx` / `FetchXmlEditor.tsx`: the missing dependencies above.
|
|
83
|
+
- `TreeView.tsx`: the one `eslint-disable` without a reason now explains why the effect runs only on selection changes.
|
|
84
|
+
- `eslint.config.js`: ignores `.claude/`, which holds local, git-ignored prototypes.
|
|
85
|
+
## [1.4.1-beta.18] - 2026-10-17
|
|
86
|
+
|
|
87
|
+
### 🔧 Fixed
|
|
88
|
+
|
|
89
|
+
- **Select Attributes: long names wrapped onto several lines and the columns couldn't be resized (#52).** Design option A, reviewed in a prototype:
|
|
90
|
+
- The dialog is wider: up to 1000px, never wider than the window.
|
|
91
|
+
- The Display name, Logical name and Type columns are resizable and sortable. Each cell stays on one line, long text ends with an ellipsis, and the full text shows in a tooltip.
|
|
92
|
+
- Search matches display or logical name. A **type filter**, a **Selected only** switch and an "N of M selected" count help with long attribute lists.
|
|
93
|
+
- Types use `AttributeTypeName`, so images, files and multi-select choices no longer all show as "Virtual".
|
|
94
|
+
- **"+ New" was overlapped by the entity box in a narrow left pane (#53).** Fluent's Combobox has a built-in minimum width (about 250px).
|
|
95
|
+
- The entity, publisher, solution and view boxes now shrink with the pane.
|
|
96
|
+
- Below 300px "New" keeps only its icon, with a "New query" tooltip and label.
|
|
97
|
+
|
|
98
|
+
### 🏗️ Technical
|
|
99
|
+
|
|
100
|
+
- `SelectAttributesDialog.tsx`: `resizableColumns` + `columnSizingOptions`, truncated cells with tooltips, type / selected-only filters, count in a fluid `DialogActions`.
|
|
101
|
+
- `EntitySelector.tsx` / `LoadViewPicker.tsx`: comboboxes and their inputs use `minWidth: 0`; the "New" button switches to icon-only with a container query (the toolbar is already an inline-size container).
|
|
102
|
+
|
|
103
|
+
## [1.4.1-beta.17] - 2026-10-16
|
|
104
|
+
|
|
105
|
+
### 🔧 Fixed
|
|
106
|
+
|
|
107
|
+
- **Changing the publisher or solution selection cleared the query** when the new selection didn't include its entity (#57 follow-up). Selecting the Default Solution, for example, wiped a `systemuserroles` query with no warning. Deselecting asked first, but still reset the tree.
|
|
108
|
+
- The scope only filters the entity picker, so the query is now never cleared.
|
|
109
|
+
- An entity outside the selection shows by its logical name, and Load View still works for it (from the full entity list).
|
|
110
|
+
- The "Confirm Publisher / Solution Change" dialog, which warned that the tree would be reset, is removed.
|
|
111
|
+
|
|
112
|
+
### 🏗️ Technical
|
|
113
|
+
|
|
114
|
+
- `EntitySelector.tsx`: no auto-clear effect and no confirm dialog; `selectedEntityMetadata` falls back to the full entity list.
|
|
115
|
+
|
|
116
|
+
### 🧪 Test (PPTB, sandbox)
|
|
117
|
+
|
|
118
|
+
- Parse to Tree on `<fetch><entity name="systemuserroles"><attribute name="roleid" /><link-entity name="role" from="roleid" to="roleid" alias="r"><attribute name="name" /></link-entity></entity></fetch>`. Then select the Default Publisher and Default Solution, and deselect both: the query stays every time, with no dialog; the entity box shows `systemuserroles`; Load View is available.
|
|
119
|
+
|
|
120
|
+
## [1.4.1-beta.16] - 2026-10-16
|
|
121
|
+
|
|
122
|
+
### 🔧 Fixed
|
|
123
|
+
|
|
124
|
+
**Advanced Find Only** now does what it says, everywhere (#57). [`IsValidForAdvancedFind`](https://learn.microsoft.com/dotnet/api/microsoft.xrm.sdk.metadata.entitymetadata.isvalidforadvancedfind) means "shown in Advanced Find"; it isn't a query restriction. Turning it off is how FetchXML Studio builds queries Advanced Find can't. Checked against the sandbox:
|
|
125
|
+
- **Hidden entities were missing in the Publisher → Solution and Solution scopes** (`userquery`, the reported case). Those scopes always loaded Advanced Find entities only. The setting now applies in every scope.
|
|
126
|
+
- Verified: 347 of 421 hidden entities query fine with FetchXML, including `userquery`, `savedquery`, `systemform`, `sdkmessageprocessingstep` and the intersect entities.
|
|
127
|
+
- The rest return a Dataverse error, shown on Execute as usual.
|
|
128
|
+
- **Hidden attributes and relationships were never offered**, even with the setting off. With it off, every picker now offers them: the tree, Select attributes, conditions, orders, link-entities, Add columns and relationships.
|
|
129
|
+
- Verified: 1,028 of 1,053 hidden attributes and all 1,593 hidden relationships work.
|
|
130
|
+
- **Attributes that can't be read are never offered.** `IsValidForRead = false` attributes fail in every query (`0x80041a08`, 25 of 25).
|
|
131
|
+
- **Operators for attribute types that only appear with the setting off** (verified on each):
|
|
132
|
+
- label attributes such as `statuscodename` (Virtual): `null`, `not-null`, `eq`, `like`; they can be sorted, but not grouped or aggregated (`0x8004e01d` / `0x80044150`);
|
|
133
|
+
- images, files, managed properties and entity names: `null` and `not-null` only (`eq` / `like` fail: `0x80040203`);
|
|
134
|
+
- PartyList (`to`, `cc`, `from`): no conditions; every condition fails (`0x80040203`).
|
|
135
|
+
- **Attributes already in a query keep their metadata** (operators, value inputs, grid formatting) whatever the setting. A pasted query that uses a hidden attribute works either way.
|
|
136
|
+
- The setting's description and tooltip say what it covers.
|
|
137
|
+
- **Parse to Tree emptied the tree and the editor** in the Publisher → Solution and Solution scopes when the selected solutions didn't include the query's entity (reported with `systemuserroles`). The same happened to opened files, loaded views and queries from other tools, and toggling Advanced Find Only would have done it too.
|
|
138
|
+
- The scope only filters the entity picker. The query is now cleared only after *you* change the publisher or solution selection, once the new entity list has loaded without the query's entity.
|
|
139
|
+
- Otherwise the entity box shows the query's logical name.
|
|
140
|
+
- **Intersect entities can be joined from the relationship picker.** `systemuserroles`, `teammembership`, `listmember` and the rest have no many-to-one relationships for their attributes (plain Uniqueidentifiers), so nothing was offered. They now offer a join to each side of the many-to-many relationship they implement, e.g. `systemuserroles → role via roleid (systemuserroles_association)`, in the relationship picker and in Add columns → Related.
|
|
141
|
+
- Verified on every intersect entity in the sandbox: 141 entities, 302 joins. Every join runs except on the few intersect entities that can't be queried at all.
|
|
142
|
+
- Picking one adds `<link-entity name="role" from="roleid" to="roleid">`.
|
|
143
|
+
- **Selecting a new link-entity crashed the app** (blank screen). Its placeholder name has no attributes, and the attribute picker's fallback dropped a prop Fluent needs (`selectedOptions`).
|
|
144
|
+
- **A new link-entity kept its placeholder alias** (`new_entity`) after a 1:N or N:1 relationship was picked. It now gets an alias for the related entity (e.g. `systemuser`).
|
|
145
|
+
|
|
146
|
+
### 🏗️ Technical
|
|
147
|
+
|
|
148
|
+
- New `state/metadataScope.ts`: scope rules (`isEntityInScope`, `isAttributeInScope`, `isRelationshipInScope`) and the current setting (`metadataScope`, `useAdvancedFindOnly`).
|
|
149
|
+
- `dataverseMetadata.ts`:
|
|
150
|
+
- attributes and relationships are fetched once, unfiltered, and filtered locally;
|
|
151
|
+
- `loadAllEntityAttributes` for lookups, `loadEntityAttributes` for pickers;
|
|
152
|
+
- `loadAllEntities` shares the Publisher / Solution entity cache.
|
|
153
|
+
- `pptbClient.ts`: `getAllEntitiesForScopes` (replaces the Advanced Find–only `getAllAdvancedFindEntities`); the unused `getAdvancedFindEntitiesByNames` is removed; attributes select `IsValidForRead`.
|
|
154
|
+
- `operators.ts`: Virtual attributes are typed by `AttributeTypeName` (multi-select, image, file, label).
|
|
155
|
+
- `attributeCapabilities.ts`: VirtualType can be sorted.
|
|
156
|
+
- `manyToMany.ts`: `planIntersectEntityJoins` (an intersect entity's joins to each side) and `relationshipKey` (the two joins share a schema name); `loadEntityRelationships` adds them for intersect entities.
|
|
157
|
+
- `EntitySelector.tsx`: the query is cleared only after a publisher / solution change made by the user.
|
|
158
|
+
- `aliasUtils.ts`: `collectLinkEntityAliases` and `generateUniqueAlias` moved here from the builder store.
|
|
159
|
+
|
|
160
|
+
### 🧪 Test (sandbox)
|
|
161
|
+
|
|
162
|
+
- With Advanced Find Only off, every scope: `<fetch top="5"><entity name="userquery"><attribute name="name" /><attribute name="returnedtypecode" /></entity></fetch>`.
|
|
163
|
+
- Intersect entity: `<fetch><entity name="systemuserroles"><attribute name="roleid" /><link-entity name="role" from="roleid" to="roleid" alias="r"><attribute name="name" /></link-entity></entity></fetch>`.
|
|
164
|
+
- Hidden attribute: `<fetch top="5"><entity name="account"><attribute name="name" /><attribute name="versionnumber" /><order attribute="versionnumber" descending="true" /></entity></fetch>`.
|
|
165
|
+
- Label attribute: `<fetch top="5"><entity name="contact"><attribute name="fullname" /><filter><condition attribute="statuscodename" operator="like" value="%Active%" /></filter><order attribute="statuscodename" /></entity></fetch>`.
|
|
166
|
+
- In PPTB, Publisher → Solution scope with a solution that doesn't include `systemuserroles`: Parse to Tree on the intersect query keeps the tree; Execute returns 407 rows. Added the `systemuser` join from the relationship picker and Full Name from Add columns → Related: `<link-entity name="systemuser" from="systemuserid" to="systemuserid" alias="systemuser"><attribute name="fullname" /></link-entity>`, 407 rows.
|
|
167
|
+
|
|
168
|
+
## [1.4.1-beta.15] - 2026-10-16
|
|
169
|
+
|
|
170
|
+
### 🔧 Fixed
|
|
171
|
+
|
|
172
|
+
Paging, **Retrieve All** and infinite scroll (#58, #60). Every case was run against the sandbox through the production code, following [Page results using FetchXml](https://learn.microsoft.com/power-apps/developer/data-platform/fetchxml/page-results).
|
|
173
|
+
- **The paging cookie was never used (#58).** FetchXML Studio read `@Microsoft.Dynamics.CRM.pagingcookie`, which the Web API doesn't send.
|
|
174
|
+
- The cookie is now read from `@Microsoft.Dynamics.CRM.fetchxmlpagingcookie`: the `pagingcookie` attribute of that element, URL-decoded twice, as documented.
|
|
175
|
+
- Every page after the first was fetched by page number only, which Microsoft doesn't recommend. Verified: pages fetched with the cookie match page-number paging, with no duplicates.
|
|
176
|
+
- **Queries Dataverse returns no cookie for** (sorted by a link-entity attribute, or `distinct`) page by page number. That's the documented fallback, and a note above the grid says so.
|
|
177
|
+
- Dataverse reports page 2 as the next page on *every* page of these queries (verified). The next page is now always the page just fetched + 1, and an empty page ends paging, so a loop can't repeat a page.
|
|
178
|
+
- **Retrieve All could mix results (#60).**
|
|
179
|
+
- Changing the entity, loading a view or starting a new query while pages were loading brought the old rows back. Pages from an older run are now dropped.
|
|
180
|
+
- A record delete re-runs the query directly. That could start a second loop alongside the first; the first is now dropped.
|
|
181
|
+
- A failed page was only logged to the console. Now a message above the grid says how many rows loaded and which page failed, with **Retry**.
|
|
182
|
+
- **Stop button (#60).** While Retrieve All runs, **Stop** appears at the start of the results command bar. The loaded rows stay; scrolling to the end loads more one page at a time.
|
|
183
|
+
- **System and personal views stopped at 5,000 rows.** Views return `@odata.nextLink` instead of a cookie (verified); FetchXML Studio now follows it, for Retrieve All and scrolling alike.
|
|
184
|
+
- **The query's own paging was ignored:**
|
|
185
|
+
- `count` was read from the tree instead of the FetchXML that ran (editor mode). Each page now keeps the executed query's `count`.
|
|
186
|
+
- `page="3"` in the query continued at page 2. It now continues at page 4.
|
|
187
|
+
- `top` is read from the executed FetchXML; queries with `top` aren't paged, as documented.
|
|
188
|
+
- `page`, `paging-cookie` and `count` in single quotes were added again instead of replaced, which made the XML invalid.
|
|
189
|
+
- Cookie values containing `$&`, `$1` and similar were mangled when written into the query.
|
|
190
|
+
- **Each page's full response was logged to the console**, which kept every row of a large Retrieve All in memory. It's now debug-only.
|
|
191
|
+
|
|
192
|
+
### 🏗️ Technical
|
|
193
|
+
|
|
194
|
+
- New `api/paging.ts`: `parseFetchXmlPagingCookie`, `readFetchPagingOptions`, `nextLinkToQueryPath`, `advancePaging`, `hasNextPage`, and the `PagingState` / `PagingNotice` types.
|
|
195
|
+
- `pptbClient.ts`: one `pagingFromResponse` for FetchXML and view responses; new `executeNextLink`.
|
|
196
|
+
- `fetchxml.ts`: `addPagingToFetchXml` replaces either quote style and keeps the query's `count` unless one is given.
|
|
197
|
+
- `AppShell.tsx`: one paging state (in a ref, so the page loops don't read stale state), plus result and page run tokens.
|
|
198
|
+
|
|
199
|
+
### 🧪 Test FetchXML (sandbox)
|
|
200
|
+
|
|
201
|
+
- Cookie paging: `<fetch count="50"><entity name="systemuser"><attribute name="systemuserid" /><order attribute="fullname" /><order attribute="systemuserid" /></entity></fetch>`: 234 of 234 users, no duplicates.
|
|
202
|
+
- No cookie (distinct): `<fetch count="50" distinct="true"><entity name="systemuser"><attribute name="fullname" /><order attribute="fullname" /></entity></fetch>`: every distinct name once.
|
|
203
|
+
- No cookie (link-entity order): `<fetch count="40"><entity name="systemuser"><attribute name="systemuserid" /><order entityname="bu" attribute="name" /><order attribute="systemuserid" /><link-entity name="businessunit" from="businessunitid" to="businessunitid" alias="bu" link-type="inner"><attribute name="name" /></link-entity></entity></fetch>`: 234 of 234.
|
|
204
|
+
- Starting page: `<fetch count="50" page="3"><entity name="systemuser"><attribute name="systemuserid" /><order attribute="systemuserid" /></entity></fetch>`: the users after the first 100.
|
|
205
|
+
- Default page size: `<fetch><entity name="account"><attribute name="accountid" /></entity></fetch>`: 3 pages, 15,000 unique accounts.
|
|
206
|
+
- View: **Active Accounts** (system view): 3 pages through `@odata.nextLink`, 15,000 unique.
|
|
207
|
+
- `<fetch top="10"><entity name="account"><attribute name="accountid" /></entity></fetch>`: 10 rows, no paging.
|
|
208
|
+
|
|
209
|
+
## [1.4.1-beta.14] - 2026-10-15
|
|
210
|
+
|
|
211
|
+
### 🔧 Fixed
|
|
212
|
+
|
|
213
|
+
Condition operators and their values (#87). Every operator in the [operators reference](https://learn.microsoft.com/power-apps/developer/data-platform/fetchxml/reference/operators) was run against every Advanced Find attribute type on the sandbox (1,640 queries), plus the value shapes each operator takes.
|
|
214
|
+
- **"x" and fiscal operators showed a date picker.** `last-x-days`, `olderthan-x-months`, `in-fiscal-period` and the rest wrote an ISO date, which Dataverse rejects (`0x80041139`).
|
|
215
|
+
- They now take a whole number above 0. Verified: 0, negatives, decimals and dates fail.
|
|
216
|
+
- `in-fiscal-year` takes a four-digit year (verified: `23` fails).
|
|
217
|
+
- The three period-and-year operators take a **Fiscal period** and a **Fiscal year**, written as two `<value>` elements, as documented.
|
|
218
|
+
- **Four documented operators were missing:** `last-x-fiscal-years`, `last-x-fiscal-periods`, `next-x-fiscal-years` and `next-x-fiscal-periods` are now selectable.
|
|
219
|
+
- **Changing the operator kept a value of the wrong shape** (a date for a number, a list for a single value). The value is now kept only when the new operator takes the same shape.
|
|
220
|
+
- **Operators offered per attribute follow what Dataverse accepts:**
|
|
221
|
+
- `contain-values` / `not-contain-values` only for multi-select choices (single choices fail: `0x80048415`); multi-select choices get their own list instead of every operator, and their option values are offered.
|
|
222
|
+
- The user / team operators (`eq-userid`, `eq-userteams`, …) aren't offered for Customer lookups (`0x8004034b`).
|
|
223
|
+
- The hierarchy operators (`under`, `above`, …) only for the primary key of a hierarchical entity (lookups fail: `0x80040203`).
|
|
224
|
+
- Hour and minute operators are left out for date-only *behaviour* (`0x80048415`), but no longer for a date-only *format* with user-local behaviour, which accepts them (verified).
|
|
225
|
+
- Strings get `gt` / `ge` / `lt` / `le`, as documented.
|
|
226
|
+
- **New checks (Validate / Execute), verified live:**
|
|
227
|
+
- an "x" operator without a whole number above 0;
|
|
228
|
+
- a fiscal year that isn't four digits;
|
|
229
|
+
- `between` or a period-and-year operator without exactly two values;
|
|
230
|
+
- `in` / `not-in` / `contain-values` without `<value>` elements;
|
|
231
|
+
- a single-value operator with `<value>` elements or no value.
|
|
232
|
+
- A value on an operator that takes none is a note: Dataverse ignores it.
|
|
233
|
+
- None of the 60 Microsoft Learn examples trigger them.
|
|
234
|
+
|
|
235
|
+
### 🏗️ Technical
|
|
236
|
+
|
|
237
|
+
- `operators.ts`: `getOperatorsForAttribute` (type, multi-select, primary key, date-only behaviour, hierarchical entity), `operatorValueShape` and `adaptValueForOperator`; new value types `integer`, `year`, `fiscalPeriodYear`.
|
|
238
|
+
- `fetchxmlRules.ts`: `conditionValueIssue`.
|
|
239
|
+
- The option set request also casts to `MultiSelectPicklistAttributeMetadata`.
|
|
240
|
+
|
|
241
|
+
## [1.4.1-beta.13] - 2026-10-15
|
|
242
|
+
|
|
243
|
+
### 🔧 Fixed
|
|
244
|
+
|
|
245
|
+
Results grid **Edit columns / Add columns** and **header sorting** (#114). Each change was checked against the sandbox.
|
|
246
|
+
- **Removing a column only worked for un-aliased root attributes.** Aliased attributes and link-entity columns were silently kept.
|
|
247
|
+
- Removing now finds the attribute behind any column.
|
|
248
|
+
- It also removes sorts that use the attribute's alias (Dataverse rejects an order alias that no longer exists).
|
|
249
|
+
- An **outer** link-entity left with nothing in it is removed too. A 1:N join would otherwise keep multiplying the rows without showing anything. Inner joins are kept, because they still filter.
|
|
250
|
+
- **All columns could be removed.** A query with no attributes returns every attribute, so Apply is now disabled until at least one column remains.
|
|
251
|
+
- **Add columns in aggregate queries** added plain attributes, which Dataverse rejects (every attribute needs Group by or an aggregate, and an alias). It's now unavailable there, with the reason.
|
|
252
|
+
- **The Related tab offered attributes the link-entity already returns.** It now leaves them out.
|
|
253
|
+
- **Columns of link-entities without an alias never showed in the grid.**
|
|
254
|
+
- Dataverse names them `{name}{N}.attribute`, where N is the position among the joined link-entities (verified, and documented on the link-entity reference), not `name.attribute`.
|
|
255
|
+
- The layout and the grid now use the same names. This affects queries loaded from views or pasted FetchXML.
|
|
256
|
+
- **Header sorting wrote orders Dataverse rejects:**
|
|
257
|
+
- aggregate queries got `<order attribute>` instead of `<order alias>`;
|
|
258
|
+
- an aliased link-entity attribute got `<order attribute="alias">` on the root (`0x80041103`); it's now `entityname` + attribute name;
|
|
259
|
+
- multi-select option sets could be sorted (`0x80050224`); unsortable types now show a message instead.
|
|
260
|
+
- **Single-column sort:** it replaces every order in the query, including orders inside link-entities, so the results are sorted by that column only.
|
|
261
|
+
|
|
262
|
+
### 🏗️ Technical
|
|
263
|
+
|
|
264
|
+
- `model/queryColumns.ts`: one model of the result columns (keys exactly as Dataverse returns them) shared by the layout, the grid, column removal and sorting. Tests in `queryColumns.test.ts`.
|
|
265
|
+
- `setSort` takes a planned order (root, or inside a link-entity when the root can't target it).
|
|
266
|
+
|
|
267
|
+
## [1.4.1-beta.12] - 2026-10-15
|
|
268
|
+
|
|
269
|
+
### 🔧 Fixed
|
|
270
|
+
|
|
271
|
+
- **Apostrophes stay literal in generated FetchXML (#63).** Values were written with `'`. That's valid XML, but it broke Power Automate expressions pasted into the Fetch Xml Query field (e.g. `@{body('Parse_payload')?['Student']}`).
|
|
272
|
+
- Attribute values are always in double quotes, so only `&`, `<`, `>` and `"` are escaped; `<value>` text escapes `&`, `<` and `>`.
|
|
273
|
+
- Verified live: raw apostrophes are accepted in both forms.
|
|
274
|
+
- **Every value in generated FetchXML is escaped (#63, #94).** Entity, attribute and link-entity names, aliases, `from` / `to`, order references, `hint` and `operator` were written unescaped, so pasted or parsed values with `"`, `&` or `<` produced broken XML.
|
|
275
|
+
- **Corrected aliases no longer break their references (#94).** When Parse to Tree corrects an invalid alias, it now updates every reference to it as well: condition and order `entityname`, `valueof` (including aliases that contained dots), and aggregate order aliases. The fix is listed with the corrections.
|
|
276
|
+
- Verified live: a link-entity alias with dots fails as soon as `valueof` refers to it (`0x80040216`); the corrected query runs.
|
|
277
|
+
- **New link-entity aliases can't collide with link-entities inside filters (#94).** Generated aliases now take any / not any / all / not all link-entities into account.
|
|
278
|
+
- **Intellisense follows the FetchXML reference (#94).**
|
|
279
|
+
- Value suggestions now work for hyphenated attributes (`link-type`, `paging-cookie`, `no-lock`, `utc-offset`).
|
|
280
|
+
- Added the documented attributes that were missing: `aggregatelimit`, `datasource`, `latematerialize`, `options` (with the documented hints) and `useraworderby` on fetch; `entityname` on order; `rowaggregate` on attribute; `hint` and both quick find overrides on filter.
|
|
281
|
+
- Removed `order` as a child of `<fetch>` and the condition `aggregate`, which Dataverse ignores.
|
|
282
|
+
- Undocumented attributes are suggested only where verified and say so: `utc-offset`, `version`, `mapping`, `output-format`, `min-active-row-version`, link-entity prefiltering, `natural`, and the saved-view `uiname` / `uitype` / `uihidden`.
|
|
283
|
+
- The operator list is the parser's own list, so the two can't drift apart.
|
|
284
|
+
- Condition `attribute` stays required: the reference lists it as optional, but Dataverse rejects a condition without it (`0x8004111e`).
|
|
285
|
+
- **Power Automate Top Count comes from `top` only (#94).** It used to take `count`, which is a page size, not a limit ([page-results](https://learn.microsoft.com/power-apps/developer/data-platform/fetchxml/page-results)).
|
|
286
|
+
- **Web API snippet (#94).** It adds the documented `Prefer: odata.include-annotations="*"` header (formatted values, paging cookie and more-records annotations) and the paging-cookie steps.
|
|
287
|
+
- **More than one filter in an entity is noted (#94).** The reference allows one. Dataverse accepts several and combines them with *and* (verified, same rows as one nested filter), so it's a note, never an error.
|
|
288
|
+
|
|
289
|
+
### 🏗️ Technical
|
|
290
|
+
|
|
291
|
+
- `KNOWN_OPERATORS` moved to `operators.ts`, shared by the parser and the intellisense.
|
|
292
|
+
- `collectLinkEntityAliases` uses `collectAllLinkEntities`.
|
|
293
|
+
- `correctness94.test.ts`: escaping round trips, alias references, the intellisense catalogue against the reference, and the code generators.
|
|
294
|
+
|
|
295
|
+
## [1.4.1-beta.11] - 2026-10-15
|
|
296
|
+
|
|
297
|
+
### 🔧 Fixed
|
|
298
|
+
|
|
299
|
+
- **Many-to-many relationships from the relationship picker return the right rows (#85).** Choosing an N:N relationship built a single link-entity straight to the related entity, using the intersect entity's attribute names. That silently returned 0 rows (or failed, depending on the side).
|
|
300
|
+
- It now builds the [documented pattern](https://learn.microsoft.com/power-apps/developer/data-platform/fetchxml/join-tables#many-to-many-relationships): the link-entity becomes the intersect entity (`intersect="true"`, joined on the parent's primary key), and the related entity is nested inside it, with the alias, so attributes are added there.
|
|
301
|
+
- The attributes come from the relationship metadata (`IntersectEntityName`, `Entity1/2IntersectAttribute`) and both entities' primary keys. It works from either side, and for self-referential relationships.
|
|
302
|
+
- **Verified live:** for every many-to-many relationship with data in the sandbox (47 checks from both sides, system, custom and self-referential), the join returned exactly the intersect entity's pairs.
|
|
303
|
+
|
|
304
|
+
- **Attribute pickers show their value even when it isn't in the attribute list.** For example, intersect entities usually have no Advanced Find attributes, so the From / To pickers on an N:N join looked empty.
|
|
305
|
+
|
|
306
|
+
### 🏗️ Technical
|
|
307
|
+
|
|
308
|
+
- `model/manyToMany.ts`: `planManyToManyJoin`, with tests.
|
|
309
|
+
|
|
310
|
+
## [1.4.1-beta.10] - 2026-10-15
|
|
311
|
+
|
|
312
|
+
### 🔧 Fixed
|
|
313
|
+
|
|
314
|
+
- **Dark theme covers the whole tool (#67).** The left pane (tree and properties) and any surface without its own background showed the page's white canvas behind dark-theme text, which made them unreadable in dark mode. The theme background now covers the whole tool. Native controls (scrollbars, date inputs) follow the theme too (`color-scheme`).
|
|
315
|
+
- **The tool follows the PPTB theme live, including System (#67).**
|
|
316
|
+
- On `settings:updated`, the tool now always asks the host for the resolved theme (`getCurrentTheme()`). It used to read the raw setting, and "system" was treated as light.
|
|
317
|
+
- The host sends no event when the OS theme changes while ToolBox is set to System. The tool now also listens for the OS colour scheme and asks the host again, so it switches without a reload. An explicit Light or Dark setting is kept.
|
|
318
|
+
- Only the latest theme request applies.
|
|
319
|
+
- Verified against the PPTB 1.2.7 host source: `getCurrentTheme()` resolves System from `nativeTheme`, and `settings:updated` carries only the changed settings.
|
|
320
|
+
|
|
321
|
+
### 🏗️ Technical
|
|
322
|
+
|
|
323
|
+
- `usePptbContext.test.ts`: the theme contract (settings:updated with System, OS changes, explicit settings, cleanup, standalone).
|
|
324
|
+
- Removed the theme debug logging from `AppShell`.
|
|
325
|
+
|
|
326
|
+
## [1.4.1-beta.9] - 2026-10-14
|
|
327
|
+
|
|
328
|
+
### ✨ Added
|
|
329
|
+
|
|
330
|
+
- **A complete, metadata-driven properties panel (#90b).** Every node type now has an editor that covers the FetchXML reference. The "coming in a later phase" placeholders are gone. Fields use Fluent UI v9 info popovers with a **Learn more** link to the matching Microsoft Learn article, sentence-case labels and Entity / Attribute / Logical Name terms.
|
|
331
|
+
- **Fetch Query:**
|
|
332
|
+
- **Query:** aggregate, distinct, total record count, sort option sets by value.
|
|
333
|
+
- **Paging and limits:** top, count, page and paging cookie. `top` can't be combined with paging, so the conflicting fields explain why.
|
|
334
|
+
- **Aggregation:** `aggregatelimit` (1–50,000).
|
|
335
|
+
- **Data source:** Active / Retained. Retained is disabled when the entity's long-term retention is off.
|
|
336
|
+
- **Performance:** late materialize, the documented query hints as checkboxes, and any other hints kept as tags.
|
|
337
|
+
- **Advanced:** UTC offset.
|
|
338
|
+
- **Turning off aggregate** lists what it would remove or change (Group by, aggregates, alias sorts) and asks first.
|
|
339
|
+
- **Entity:** the entity's logical and display name, plus report prefiltering (`enableprefiltering`, `prefilterparametername`).
|
|
340
|
+
- **All attributes:** what it does, Microsoft's guidance against it, and a Remove button.
|
|
341
|
+
- **Attribute:**
|
|
342
|
+
- **Role:** Group by or Aggregate.
|
|
343
|
+
- **Function:** only the functions the attribute's type supports.
|
|
344
|
+
- **Group by options:** date grouping (required for date attributes), time zone, and unique values for count of values.
|
|
345
|
+
- **Count child records:** offered on the primary key of hierarchical entities.
|
|
346
|
+
- **Renaming an alias** updates the sorts that use it.
|
|
347
|
+
- **Sort:**
|
|
348
|
+
- **Regular queries:** an attribute picker limited to sortable types.
|
|
349
|
+
- **Aggregate queries:** a list of the aliases in scope.
|
|
350
|
+
- **Entity:** sort a link-entity first.
|
|
351
|
+
- **Filter:** all (and) / any (or), the union hint (only for `or`, one per query), quick find, and the quick find record limit overrides.
|
|
352
|
+
- **Condition:** Entity (`entityname`, filter after an outer join), attribute, operator and value. **Compare to** chooses between a value and another attribute.
|
|
353
|
+
- **Link-entity:**
|
|
354
|
+
- entity, From / To attribute pickers, link type, alias and intersect;
|
|
355
|
+
- link types are offered by placement: inside a filter only any / not any / all / not all;
|
|
356
|
+
- descriptions follow the docs, including that `all` / `not all` mean the opposite of what the names suggest.
|
|
357
|
+
- **Tree badges:**
|
|
358
|
+
- **Fetch Query:** Aggregate, Distinct, Retained, Hints.
|
|
359
|
+
- **Attributes:** Group by (with date grouping), the aggregate function, Unique, Child count.
|
|
360
|
+
- **Filters:** Union, Quick find.
|
|
361
|
+
- **Any node with a rule error:** a red **Error** badge.
|
|
362
|
+
- **Conditions that compare attributes** read `attribute eq → other`.
|
|
363
|
+
- **Editor mode follows the properties panel.** While editor mode is on, panel edits update the editor when the editor hasn't changed the query. If it has, the editor keeps your text and says so.
|
|
364
|
+
|
|
365
|
+
### 🔧 Fixed
|
|
366
|
+
|
|
367
|
+
- **Comparing to another attribute (`valueof`) only offers what Dataverse accepts (#94).**
|
|
368
|
+
- The choice appears only for eq, ne, gt, ge, lt and le (others fail with `0x80048415`). Changing to another operator clears it.
|
|
369
|
+
- **Which entities are offered.** The docs show the documented same-row and link-entity-alias cases; the picker offers only those, plus what was verified to work from where the condition is:
|
|
370
|
+
- the root entity by its logical name;
|
|
371
|
+
- from the root entity's filters: any joined link-entity alias;
|
|
372
|
+
- from a link-entity's filter: only link-entities joined before it (its own children and later link-entities fail with `0x80040216`).
|
|
373
|
+
- A link-entity name without an alias, or a link-entity inside a filter, is never offered.
|
|
374
|
+
- **Which attributes are offered.** The docs say "the same type". FetchXML Studio offers the same type plus the pairs verified to work, with all six operators: Integer / option set / status / state / entity name; Decimal / Money; Lookup / Customer / Owner / unique identifier; String / Memo; Boolean / managed property; DateTime (any behaviour).
|
|
375
|
+
- Verified with a live matrix over every Advanced Find attribute type: about 2,000 queries, including calculated, rollup, composite and date-only attributes.
|
|
376
|
+
- Pairs across these groups fail (`0x80040203`), so they aren't offered.
|
|
377
|
+
- Multi-select option sets, and any type that wasn't verified, aren't offered at all.
|
|
378
|
+
- **Conditions on a link-entity attribute (`entityname`) load that entity's metadata (#94).** Numeric limits and date-only rules previously came from the wrong entity.
|
|
379
|
+
- **Switching a link-entity to not any / not all no longer deletes its filters and nested link-entities (#86).**
|
|
380
|
+
- Those filters are what these types evaluate.
|
|
381
|
+
- Switching to any type that returns no attributes (exists, in, any, not any, all, not all) now lists the attributes, all-attributes and sorts that Dataverse would reject, and asks before removing them.
|
|
382
|
+
- The tree disables adding attributes and sorts to those link-entities, and **Add Columns** creates a new link-entity instead of adding to one of them.
|
|
383
|
+
- **From / To on a link-entity are no longer marked required.** The docs say they're optional; the panel now explains what Dataverse does when one or both are missing.
|
|
384
|
+
- **Intersect** is described correctly: it only signals intent and doesn't change how the query runs.
|
|
385
|
+
- **"Visible in Results" couldn't be turned off.** `visible` isn't in the FetchXML reference, and Dataverse ignores it (verified). It's shown only when present, with a Remove button.
|
|
386
|
+
- **The condition "Aggregate function" option is gone.** Dataverse ignores `aggregate` on a condition and runs it as a plain row condition (verified): FetchXML can't filter on aggregate values. Parsed queries keep it, with a note and a Remove button.
|
|
387
|
+
- The serializer now escapes condition `attribute`, `entityname` and `valueof` values.
|
|
388
|
+
- Removed a leftover "Export not yet implemented" console fallback.
|
|
389
|
+
|
|
390
|
+
### 🔍 New checks
|
|
391
|
+
|
|
392
|
+
Each check was verified against a live Dataverse org.
|
|
393
|
+
- **Errors:**
|
|
394
|
+
- `top` with `count`, `page` or `returntotalrecordcount` (moved from the parser to the query rules, so the panel shows it on the field);
|
|
395
|
+
- `page` below 1;
|
|
396
|
+
- `valueof` with an unsupported operator (`0x80048415`), or with a qualifier the condition can't reach: not a joined link-entity alias or the root entity, or a link-entity joined after the one whose filter holds the condition (`0x80040216`);
|
|
397
|
+
- a link-entity inside a filter that isn't any / not any / all / not all (`0x8004111c`);
|
|
398
|
+
- attributes, all-attributes or orders inside an exists, in, any, not any, all or not all link-entity (`0x80041121`).
|
|
399
|
+
- **Notes (never block):** condition `aggregate`, link-entity `visible`, and `valueof` on operators that take no value.
|
|
400
|
+
|
|
401
|
+
### 🏗️ Technical
|
|
402
|
+
|
|
403
|
+
- Shared panel building blocks: `fields.tsx` (`InfoField`, `InfoCheckbox`, `NumberField`, `LeftoverSetting`), `docLinks.ts`, `editorStyles.ts`, `ruleFindings.ts` and `useEditorMetadata.ts`.
|
|
404
|
+
- `aggregateToggle.ts` plans what turning off aggregate changes; `treeUtils.ts` adds `findNodeContainer`, `collectAllLinkEntities`, `collectAllFilters` and `findOrdersUsingAlias`.
|
|
405
|
+
- Metadata: `IsRetentionEnabled`, `IsLogical` and `IsPrimaryId` are read, and hierarchical entities are detected from their relationships (cached).
|
|
406
|
+
- `attributeCapabilities.ts` adds `getValueOfCompatibleTypes`; `fetchxmlRules.ts` exports `VALUEOF_OPERATORS`, `FILTER_LINK_TYPES`, `NON_RETURNING_LINK_TYPES` and `joinedLinkAliases`.
|
|
407
|
+
|
|
408
|
+
## [1.4.1-beta.8] - 2026-10-14
|
|
409
|
+
|
|
410
|
+
### 🔧 Fixed
|
|
411
|
+
|
|
412
|
+
- **The tool icon now shows in Power Platform ToolBox (#62).** PPTB resolves the top-level `icon` relative to `dist/`, but the SVGs were never copied there, so PPTB showed its default icon. A valid SVG bundled under `dist` is also a **required** item for Verified status ([publishing](https://docs.powerplatformtoolbox.com/tool-development/publishing), [maturity model](https://docs.powerplatformtoolbox.com/tool-development/maturity-model)).
|
|
413
|
+
- The build now bundles the icon at `dist/icons/icon.svg`, and `package.json` points `icon` there.
|
|
414
|
+
- Prerelease versions (e.g. `1.4.1-beta.8`) get the gold-stamped Insider icon; releases get the regular blue icon. There's no manual switch per release.
|
|
415
|
+
|
|
416
|
+
### 🏗️ Technical
|
|
417
|
+
|
|
418
|
+
- **`package-lock.json` is committed**, pinning every dependency with an integrity hash. npm's guidance: it's "intended to be committed into source repositories" and isn't published. PPTB users install the pre-built package, so this only affects development and CI.
|
|
419
|
+
- It enables `npm ci` and `npm audit` (a Verified requirement) and CI (#72).
|
|
420
|
+
- It pins exactly the versions tested so far (restored from the last `npm-shrinkwrap.json`), not a fresh resolution.
|
|
421
|
+
- `files` no longer lists `icons` (the icon ships inside `dist`) or the removed `npm-shrinkwrap.json`.
|
|
422
|
+
|
|
423
|
+
## [1.4.1-beta.7] - 2026-10-14
|
|
424
|
+
|
|
425
|
+
### 🔧 Fixed
|
|
426
|
+
|
|
427
|
+
- **Editor mode: actions now run exactly what's in the editor (#102).** In editor mode, **Execute**, **Save / Save As** and **Send to Tool** first load the editor's FetchXML into the tree, then act on the tree.
|
|
428
|
+
- **What went wrong before:**
|
|
429
|
+
- Execute ran the editor XML, but the results grid took its columns, layout, entity and record actions from the tree. With a different query in the editor, you saw the tree's (often empty) columns.
|
|
430
|
+
- Save As and Send to Tool silently used the tree's XML, not the editor's.
|
|
431
|
+
- Execute, Save As and Send to Tool were disabled while the tree was empty, even with a valid query in the editor.
|
|
432
|
+
- **Now:**
|
|
433
|
+
- Execute is enabled as soon as the editor has content.
|
|
434
|
+
- The tree always matches what ran, was saved or was sent, so the results grid, column picker, sorting and record actions all match too.
|
|
435
|
+
- Editor mode stays on, and your column widths and order are kept. Your text is kept as typed, unless loading changed the query; then the editor shows the cleaned FetchXML that ran, with an "Editor updated" note.
|
|
436
|
+
- When the editor already matches the tree, nothing is reloaded.
|
|
437
|
+
- **No silent changes:** if loading into the tree would change the query (for example, dropping a second `<entity>`), a confirmation lists the changes first ("Load and execute" / "Load and save" / "Load and send"). Invalid FetchXML is reported and nothing runs. Cancel leaves the editor and tree untouched.
|
|
438
|
+
- Loading a different query clears the loaded-view link, as any tree edit does, so Save then saves a new view.
|
|
439
|
+
- **Results are no longer cleared by a fast response** that arrives before the tree update is rendered.
|
|
440
|
+
|
|
441
|
+
### 🏗️ Technical
|
|
442
|
+
|
|
443
|
+
- `editorSync.ts`: a context that lets toolbar buttons rendered inside the results/editor pane ask it to sync before acting.
|
|
444
|
+
- `ParseChangesDialog.tsx`: the Parse to Tree confirmation, shared by Parse to Tree and the editor-mode actions.
|
|
445
|
+
- `loadFetchXml(xml, { preserveLayout })` keeps the current column layout and merges new attributes into it.
|
|
446
|
+
|
|
447
|
+
## [1.4.1-beta.6] - 2026-10-14
|
|
448
|
+
|
|
449
|
+
### 🔧 Fixed
|
|
450
|
+
|
|
451
|
+
- **Validate and Execute now catch the query mistakes Dataverse rejects (#90b, part 1).** New query-level rules, each verified against a live Dataverse org. FXS's parser agreed with Dataverse on all 48 rule cases (0 mismatches).
|
|
452
|
+
- **Aggregate queries:**
|
|
453
|
+
- every attribute needs Group by or an aggregate (`0x8004111e`) and an alias (`0x8004110b`);
|
|
454
|
+
- an attribute can't be both Group by and an aggregate (`0x80041137`);
|
|
455
|
+
- Group by and aggregates outside aggregate queries are errors (`0x8004112e`, `0x8004111a`);
|
|
456
|
+
- an order can only use aliases from its own entity or link-entity (`0x8004110a`);
|
|
457
|
+
- `aggregatelimit` together with an order fails with a SQL error.
|
|
458
|
+
- **Orders:** `entityname` must match a link-entity alias, a link-entity name or the root entity (`0x80041108`), and isn't allowed on orders inside a link-entity.
|
|
459
|
+
- **Aliases:** must be unique across the query, case-insensitively, and can't reuse the logical name of another attribute selected without an alias. Link-entity aliases must be unique too (`0x80041130`).
|
|
460
|
+
- **Filters:** the union hint must be exactly `union`, on an `or` filter, once per query (`0x80041122`). Other hint values were silently dropped by Parse to Tree; they're now reported.
|
|
461
|
+
- **Count child records (`rowaggregate`):** needs an alias, works only on the root entity, and doesn't work in aggregate queries.
|
|
462
|
+
- **Ignored, not errors:** settings Dataverse accepts but ignores are reported as information only. Examples: `aggregatelimit` or date grouping outside aggregate queries, and `distinct` on aggregates other than `countcolumn`.
|
|
463
|
+
- **Boolean spellings Dataverse accepts are read correctly.**
|
|
464
|
+
- `usertimezone="1"` used to be read as **false** (inverted meaning after Parse to Tree).
|
|
465
|
+
- `groupby="1"`, `descending="1"`, `distinct="1"`, `returntotalrecordcount="1"` and `enableprefiltering="1"` (the documented form) were dropped.
|
|
466
|
+
- `descending="True"`, which Dataverse rejects (`0x80041119`), is now an error instead of silently sorting ascending.
|
|
467
|
+
- `aggregate` only makes an aggregate query when it's exactly `"true"`, as Dataverse does.
|
|
468
|
+
- **Report prefiltering is written as `enableprefiltering="1"`**, the documented value ([Use data filtering](https://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/analytics/improve-report-performance-by-using-filters?view=op-9-1)).
|
|
469
|
+
- **Choosing "None" no longer writes `aggregate="none"` / `dategrouping="none"` (#88).** The Attribute and Condition editors clear the value instead, and the serializer never writes values outside the documented sets. The invalid "Row Aggregate" aggregate option is removed (`0x8004111a`).
|
|
470
|
+
|
|
471
|
+
### 🏗️ Technical
|
|
472
|
+
|
|
473
|
+
- `model/fetchxmlRules.ts`: query-level rules shared by the parser and (next) the property editors. Findings carry the `nodeId` they refer to.
|
|
474
|
+
- `model/attributeCapabilities.ts`: the metadata-driven capability matrix for the property panel. It records which attribute types support sort, group by and each aggregate function. It came from a 912-query live matrix over every attribute type, identical through `fetchXmlQuery` and `queryData`.
|
|
475
|
+
- Example: Money attributes can't be counted through the Web API.
|
|
476
|
+
- Example: multi-select option sets can't be sorted or grouped.
|
|
477
|
+
- `AttributeNode.aggregate` no longer allows `"rowaggregate"`.
|
|
478
|
+
- 280 unit tests.
|
|
479
|
+
- `npm-shrinkwrap.json` removed, and `finalize-package` no longer runs `npm shrinkwrap` (npm 12 dropped that command). The local `.claude/` workspace folder is git-ignored.
|
|
480
|
+
|
|
481
|
+
## [1.4.1-beta.5] - 2026-10-13
|
|
482
|
+
|
|
483
|
+
### 🔧 Fixed
|
|
484
|
+
|
|
485
|
+
- **FetchXML now runs against the entity's real entity set name (#61).** Queries used to go through the host's `fetchXmlQuery`, which guesses the Web API entity set name with English plural rules. Measured on the sandbox org, the guess is wrong for **67 of 1,612** Advanced Find entities, so every query on them failed. Examples: `feedback` (host requested `feedbacks`) and `msdyn_conversationdata` (actual set `msdyn_conversationsdata`).
|
|
486
|
+
- Execution now uses `dataverseAPI.queryData(`${EntitySetName}?fetchXml=…`)` with the `EntitySetName` from entity metadata (cached). Microsoft requires the entity set name for the entity in the FetchXML's `entity` element ([Retrieve data with FetchXML](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/fetchxml/retrieve-data?tabs=webapi)).
|
|
487
|
+
- The request is otherwise identical: GET with `Prefer: odata.include-annotations="*"`. Results were the same as before across 1,047 audit queries on entities the host names correctly.
|
|
488
|
+
- The entity set comes from the FetchXML being executed, so editor-mode XML and paged requests (Load more, Retrieve all) use the right entity too.
|
|
489
|
+
- Two system entities (`archivecleanupinfo`, `delegatedauthorization`) report an `EntitySetName` the service doesn't route. When Dataverse answers "Resource not found for the segment", the query is retried once with the entity's `LogicalCollectionName`.
|
|
490
|
+
- `fetchXmlQuery` remains only as a fallback when entity metadata can't be loaded.
|
|
491
|
+
- Record delete still goes through the host, which only accepts a logical name. The metadata-based fix needs PPTB 1.2.7's `executeBatch` and moves to the v1.5.0 upgrade (#82).
|
|
492
|
+
|
|
493
|
+
## [1.4.1-beta.4] - 2026-10-13
|
|
494
|
+
|
|
495
|
+
### 📦 Dependencies
|
|
496
|
+
|
|
497
|
+
- **Fluent UI React v9 upgraded (#104)** ahead of the property-panel work in #90b:
|
|
498
|
+
- `@fluentui/react-components` 9.72.4 → 9.74.9;
|
|
499
|
+
- `@fluentui/react-icons` 2.0.313 → 2.0.343;
|
|
500
|
+
- `@fluentui/react-calendar-compat` 0.3.16 → 0.4.7 (required by the date picker);
|
|
501
|
+
- `@fluentui/react-datepicker-compat` 0.6.19 → 0.6.39;
|
|
502
|
+
- `@fluentui/react-timepicker-compat` 0.4.24 → 0.4.41;
|
|
503
|
+
- `@fluentui-contrib/react-data-grid-react-window` 1.4.1 → 1.4.2.
|
|
504
|
+
- Every new version was published at least two weeks ago. `react-icons` is pinned to 2.0.343 instead of 2.0.344 (published 2026-10-09) for that reason.
|
|
505
|
+
- The dependency tree has a single copy of each Fluent package. `npm audit` drops from 29 findings to 26 (three fewer high); the rest are tracked in #77.
|
|
506
|
+
|
|
507
|
+
### 🏗️ Technical
|
|
508
|
+
|
|
509
|
+
- `npm-shrinkwrap.json` was regenerated with npm 11.20.0. npm 12 no longer has `npm shrinkwrap`, and it writes a `package-lock.json` (without integrity hashes) instead of updating the shrinkwrap. Use npm 11 for dependency changes until the release tooling in #75 handles this.
|
|
510
|
+
|
|
511
|
+
## [1.4.1-beta.3] - 2026-10-13
|
|
512
|
+
|
|
513
|
+
### 🔧 Fixed
|
|
514
|
+
|
|
515
|
+
- **Parse to Tree is now lossless (#90a).** Previously the tree model couldn't hold several documented FetchXML attributes, so Parse to Tree (and editing in tree mode) silently dropped them or changed the query's meaning. Measured on all 60 FetchXML examples in the Microsoft Learn FetchXML articles: 25 of them changed after Parse to Tree. Now all 60 round-trip without loss.
|
|
516
|
+
- **`<fetch>`:** `aggregatelimit`, `datasource`, `latematerialize` (was parsed but never written), `options` (query hints, kept exactly as written) and `useraworderby`.
|
|
517
|
+
- **`<attribute>`:** `distinct` (for `countcolumn`) and `rowaggregate="CountChildren"`.
|
|
518
|
+
- **`<order>`:** `alias`, which aggregate queries require.
|
|
519
|
+
- **`<filter>`:** `isquickfindfields`, `overridequickfindrecordlimitenabled` and `overridequickfindrecordlimitdisabled`.
|
|
520
|
+
- **`<entity>`:** `enableprefiltering` and `prefilterparametername` were read but never written.
|
|
521
|
+
- **`<link-entity>`:** empty `from` / `to` are now omitted instead of being written as `from="" to=""`, which made Dataverse silently return no rows. The documented "let Dataverse choose" join for system many-to-many relationships now works after Parse to Tree.
|
|
522
|
+
- **Everything else that works is kept verbatim:** unknown attributes, namespaced attributes, namespace declarations (`xmlns:generator`) and legacy attributes (`version`, `output-format`, `mapping`, `uiname`, `uitype`). A default `xmlns`, which Dataverse rejects, is still removed.
|
|
523
|
+
- **New validation, verified against a live Dataverse environment:**
|
|
524
|
+
- `aggregatelimit` must be 1–50,000;
|
|
525
|
+
- `datasource` must be `retained` (documented) or `bin` (accepted by Dataverse);
|
|
526
|
+
- `aggregate="rowaggregate"` is an error (use `rowaggregate="CountChildren"`);
|
|
527
|
+
- aggregate queries must order by `alias` (`0x80041131`), and non-aggregate queries by `attribute` (`0x80041132`);
|
|
528
|
+
- query hint names that aren't documented get a note, because Dataverse silently ignores them.
|
|
529
|
+
|
|
530
|
+
### 🏗️ Technical
|
|
531
|
+
|
|
532
|
+
- Model: `FetchNode.options` gained `aggregateLimit`, `dataSource`, `useRawOrderBy` and `queryHints` (replacing an unused `hints` object). `AttributeNode` gained `distinct` and `rowAggregate`. `OrderNode.attribute` is now optional, alongside a new `alias`. `FilterNode` gained the quick find flags. Every node gained `extraAttributes` for verbatim pass-through.
|
|
533
|
+
- New round-trip suite (`fetchxmlRoundTrip.test.ts`) over all Learn examples, committed as MIT-licensed fixtures with source URLs (`__fixtures__/learnFetchXml.ts`), plus real-world FetchXML (Advanced Find, saved views, SQL 4 CDS, report prefiltering). 194 unit tests.
|
|
534
|
+
- Live replay: every Learn example executed as written and as regenerated, through the PPTB `dataverseAPI` request path, with identical results for all 53 full queries.
|
|
535
|
+
- Small display fallbacks for alias-only orders: the tree label shows `alias (alias)`, and the grid shows sort arrows on aggregate columns ordered by alias. The full UI controls for the new attributes follow in #90b.
|
|
536
|
+
|
|
537
|
+
## [1.4.1-beta.2] - 2026-10-13
|
|
538
|
+
|
|
539
|
+
### 🔧 Fixed
|
|
540
|
+
|
|
541
|
+
- **Valid FetchXML is no longer blocked in the editor (#89, #48).** Previously *any* parser warning blocked Validate and Execute. That refused FetchXML Dataverse accepts, such as `<fetch xmlns:generator="MarkMpn.SQL4CDS">` from SQL 4 CDS, `useraworderby`, `aggregatelimit` and `<order alias>`.
|
|
542
|
+
- **Principle:** everything the [FetchXML reference](https://learn.microsoft.com/power-apps/developer/data-platform/fetchxml/reference/) documents is supported. Undocumented behaviour verified to work is supported too. Only what is known not to work is blocked.
|
|
543
|
+
- Every classification was checked against a live Dataverse environment through the PPTB `dataverseAPI` request path: 33 probes, 0 mismatches.
|
|
544
|
+
- **Errors** (Execute is blocked) are things Dataverse is known to reject:
|
|
545
|
+
- invalid attribute alias characters;
|
|
546
|
+
- an unknown child element;
|
|
547
|
+
- non-integer `top` / `count` / `page`;
|
|
548
|
+
- `top` combined with `count`, `page` or `returntotalrecordcount`;
|
|
549
|
+
- an unknown `link-type`;
|
|
550
|
+
- an invalid filter `type`, aggregate or date grouping;
|
|
551
|
+
- a missing `name` / `attribute` / `operator`;
|
|
552
|
+
- an order with neither attribute nor alias;
|
|
553
|
+
- a default `xmlns`.
|
|
554
|
+
|
|
555
|
+
Parse to Tree can still build the tree and lists what it corrects or removes. Malformed XML, a missing `<entity>`, and a link-entity with empty `from=""` and `to=""` (Dataverse silently returns no rows) can't be parsed at all.
|
|
556
|
+
- **Warnings** (with **Execute anyway**) are only for what can't be determined in the client: a link-entity without `from` / `to` (valid only for system many-to-many relationships), and an operator that isn't in the documented list.
|
|
557
|
+
- **Notes** never block:
|
|
558
|
+
- namespace declarations, namespaced attributes and unknown attributes (Dataverse ignores them);
|
|
559
|
+
- documented attributes the visual builder doesn't support yet, including `datasource`;
|
|
560
|
+
- `top` / `count` above 5,000 (Dataverse returns at most 5,000 rows);
|
|
561
|
+
- the deprecated `neq` operator (works like `ne`);
|
|
562
|
+
- extra `<entity>` elements (Dataverse uses the first).
|
|
563
|
+
|
|
564
|
+
Common legacy attributes from Advanced Find and saved views (`version`, `output-format`, `mapping`, `uiname`, `uitype`) are accepted silently.
|
|
565
|
+
- **`link-type="natural"` is supported.** It's undocumented, but Dataverse accepts it; it's listed in Dataverse's own link-type error and was verified against a live org. It's preserved through Parse to Tree.
|
|
566
|
+
- **Parse to Tree no longer changes queries silently.** When it would remove or rewrite something, a confirmation dialog lists the changes under **Removed** and **Corrected**. Examples: `datasource="retained"`, which would otherwise read live data; `<order alias>`; an invalid alias.
|
|
567
|
+
- Order elements that the tree can't represent are now dropped, with a note, instead of being rewritten as the invalid `<order attribute="" />`.
|
|
568
|
+
- The misleading "Auto-corrected" label is gone.
|
|
569
|
+
- **Validate** shows at most one bar per level (Invalid FetchXML / "Dataverse might reject this query" / Notes) instead of one bar per finding. Lists are bulleted.
|
|
570
|
+
|
|
571
|
+
### 🏗️ Technical
|
|
572
|
+
|
|
573
|
+
- `ParseWarning` gained `severity` (`error` | `warning` | `info`) and `kind` (`invalid` | `ignored` | `dropped` | `corrected` | `advice`).
|
|
574
|
+
- New helpers: `getExecutionErrors()`, `getBlockingWarnings()` and `getParseToTreeChanges()`.
|
|
575
|
+
- Unknown-attribute checks now cover every element, using per-element attribute lists from the reference.
|
|
576
|
+
- New `ParseIssueList` component. The Parse to Tree confirmation uses a Fluent UI v9 `Dialog` (`modalType="alert"`, Cancel focused first).
|
|
577
|
+
- 44 new unit tests, 109 in total.
|
|
578
|
+
|
|
579
|
+
## [1.4.1-beta.1] - 2026-10-12
|
|
580
|
+
|
|
581
|
+
### 🔧 Fixed
|
|
582
|
+
|
|
583
|
+
- **Wrong attribute injected into the root entity (#54).** The root table was taken from the first entry of an alphabetically sorted list of the query's tables. That list was sorted *in place*, so a link-entity whose name sorts first (e.g. `bookableresource` before `msdyn_timeentry`) was treated as the root. Its primary key (`bookableresourceid`) was injected into the root `<entity>`, and its metadata also drove relationships, the layout and bulk delete.
|
|
584
|
+
- The root now always comes from the query's `<entity>` element.
|
|
585
|
+
- Metadata responses that arrive after the query changed are discarded.
|
|
586
|
+
- Root metadata is only used when its `LogicalName` matches the current root.
|
|
587
|
+
- **FetchXML is no longer modified (#59).** The primary key used to be injected into the generated FetchXML. That broke aggregate queries (`0x8004111e: An attribute can not be requested when an aggregate operation has been specified…`), silently defeated `distinct`, and the injected attribute never appeared in the tree.
|
|
588
|
+
- Validated on a live org through the PPTB `dataverseAPI` request path: Dataverse returns the root primary key for every non-aggregate, non-distinct query without it being selected ([Select columns](https://learn.microsoft.com/power-apps/developer/data-platform/fetchxml/select-columns?tabs=webapi)). Distinct queries return none ([Ordering and paging](https://learn.microsoft.com/power-apps/developer/data-platform/fetchxml/page-results?tabs=webapi#ordering-and-paging)).
|
|
589
|
+
- What you see in the FetchXML pane, copy, save as a view, send to another tool or generate code from is now exactly what you built.
|
|
590
|
+
- **Record actions use real record IDs only.**
|
|
591
|
+
- Record actions (Open, Copy URL, Delete, Bulk Delete, Run Workflow) are enabled only when the results contain the table's primary key.
|
|
592
|
+
- For aggregate and distinct results they are disabled, and a "Record actions unavailable" indicator explains why. Previously, Open/Copy URL could be clicked for an aggregate row and used a random ID.
|
|
593
|
+
- Grid row IDs are now unique and stable even when a 1:N join repeats a record. Synthetic row IDs are never passed to record actions.
|
|
594
|
+
|
|
595
|
+
### 🏗️ Technical
|
|
596
|
+
|
|
597
|
+
- `generateFetchXml(fetchNode)` no longer takes a `primaryIdAttribute` parameter.
|
|
598
|
+
- New `getQueryEntities()` (`model/treeUtils.ts`) and `buildRowIdentity()` (`ui/RightPane/rowIdentity.ts`), with unit tests: 65 tests in total.
|
|
599
|
+
- **Unit test baseline (#64).** Added Vitest (`npm test`, `npm run test:watch`, `npm run coverage`) with jsdom, plus 52 characterization tests for the FetchXML serializer, parser (including a parse → generate → parse round-trip of the #54 query), paging-attribute rewriting, alias utilities and the operator catalogue.
|
|
600
|
+
- **Lint cleanup, part 1 (#65).** ESLint errors reduced to zero with no behaviour change:
|
|
601
|
+
- `useBuilder` / `BuilderContext` moved to `state/builderContext.ts`;
|
|
602
|
+
- `useTheme` / `ThemeContext` moved to `shared/contexts/useTheme.ts`;
|
|
603
|
+
- `getCellRenderer` moved to `RightPane/getCellRenderer.tsx` (React Fast Refresh: component modules export only components);
|
|
604
|
+
- removed two `any` types in `ResultsGrid.tsx`;
|
|
605
|
+
- `_`-prefixed bindings are now allowed as intentionally unused.
|
|
606
|
+
- The remaining `react-hooks/exhaustive-deps` warnings can affect runtime behaviour and are handled separately.
|
|
607
|
+
|
|
10
608
|
## [1.4.0] - 2026-07-01
|
|
11
609
|
|
|
12
610
|
### ✨ Added
|