@mohsinonxrm/pptb-dataverse-request-studio 1.1.1 → 1.1.3

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 CHANGED
@@ -1,266 +1,311 @@
1
- # Changelog
2
-
3
- All notable changes to Dataverse Request Studio will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [1.1.1] - 2026-06-08
9
-
10
- ### 🐛 Fixed
11
-
12
- - **Custom OptionSet (and other typed) values incorrectly quoted as strings in
13
- `$filter` over a lookup navigation** ([#33](https://github.com/mohsinonxrm/pptb-mxrm-dataverse-request-studio/issues/33)).
14
- Filtering on a related-entity column via a nav path — e.g.
15
- `msdyn_opportunityid/abc_salesstage eq 809770000` — emitted the value as a
16
- quoted `Edm.String` (`'809770000'`), which Dataverse rejects with HTTP 500
17
- / `0x80060888`. Standard columns appeared to work only by coincidence (the
18
- root entity happened to own a same-named column). Root cause: the `$filter`
19
- encoder resolved the leaf column against the **root** table instead of
20
- walking the relationship to the **related** entity, so the leaf's
21
- `AttributeType` never drove the quoting decision. The encoder now resolves
22
- nav-path leaves against the correct related entity, so numeric/boolean/choice
23
- types are emitted unquoted and strings/GUIDs are quoted, consistently.
24
-
25
- ### ✨ Added / Changed (architecture)
26
-
27
- - **Single, metadata-driven nav-path resolver (`resolveNavPath`)** in
28
- `mock/metadata.ts` — now the one source of truth for resolving a
29
- slash-delimited path (`nav/.../leaf`, alias-aware) to its leaf `ColumnMeta`,
30
- owner table, visited chain, and first not-yet-loaded hop. The `$filter`
31
- encoder (`colLookup`), the filter editor's leaf/pending-target resolution,
32
- and the `$orderby` warnings all route through it, eliminating duplicated
33
- walk logic that had drifted out of sync.
34
- - **Related-entity metadata pre-warming (`useWarmReferencedTables`)** — the
35
- Retrieve Multiple / Retrieve Single modes now walk the `$filter`, `$expand`,
36
- `$apply`, and `$orderby` trees and pre-fetch the related entities they
37
- reference. This makes correct type resolution independent of whether the
38
- user opened the relevant editor — covering **saved-request reload**,
39
- **pasted OData URLs**, and **direct Execute**. Targeted (only referenced
40
- entities) and self-healing across multi-hop paths, so it stays clear of the
41
- 100-concurrent-request cap.
42
- - **Paste-OData parsing** now validates and pre-loads nav-path filter leaves
43
- instead of skipping them.
44
- - **Metadata cache TTL raised from 5 minutes to 1 hour**, with a new
45
- **Settings → Refresh metadata** button (`metadata.refreshAll`) to force a
46
- fresh pull after publishing schema changes mid-session.
47
-
48
- ## [1.1.0] - 2026-05-25
49
-
50
- ### ✨ Added
51
-
52
- - **Scope-setup guidance banner** — when the tool loads with the entity scope
53
- unconfigured (i.e. `entityScopeMode` is `publisher-solution` or
54
- `solution-only` but no solutions have been selected), a contextual
55
- `MessageBar` (warning intent) is shown at the top of the Target pane across
56
- **all 14 modes** that use `TargetEditor`. The banner provides a mode-specific
57
- hint and an **Open Settings** button that opens the Settings drawer directly.
58
- It disappears automatically once the user selects a publisher / solution (or
59
- switches to *All Entities*) — no dismiss cookie required, because the
60
- condition is purely reactive to the persisted `DisplaySettings` state.
61
-
62
- - **`OpenSettingsProvider` / `useOpenSettings` / `useRegisterOpenSettings`**
63
- (`src/host/useOpenSettings.tsx`) — new React context that provides a
64
- stable `() => void` callback to open the Settings drawer from any component
65
- in the tree without prop-drilling. Uses a ref-based registration pattern
66
- (zero provider re-renders). `FrameHeader` registers the callback on mount;
67
- any consumer calls `useOpenSettings()` to get it.
68
-
69
- - **`useScopedEntities` now exposes `needsSetup: boolean` and
70
- `scopeMode: EntityScopeMode`** — consumers can detect the
71
- unconfigured-scope condition and tailor guidance text accordingly.
72
-
73
- ### 🔍 Settings persistence confirmation
74
-
75
- - Verified that all `DisplaySettings` (scope mode, selected publisher /
76
- solution IDs, display flags) are persisted via `window.toolboxAPI.settings`
77
- under the namespaced key `pptb-dataverse-request-studio:displaySettings`.
78
- The prefix is distinct from other PPTB tools (e.g. FetchXML Studio). No
79
- changes to the persistence layer were required.
80
-
81
- ---
82
-
83
- ## [1.0.0] - 2026-05-24
84
-
85
- Initial public release of Dataverse Request Studio — a metadata-driven studio
86
- for composing, previewing, and executing Microsoft Dataverse Web API requests
87
- inside Power Platform ToolBox.
88
-
89
- ### ✨ Added
90
-
91
- #### 📖 Read group (4 modes)
92
-
93
- - **Retrieve Multiple** — full OData composer:
94
- `$select` / `$filter` / `$orderby` / `$expand` / `$top` / `$skip` /
95
- `$count` / `$apply` (groupby + aggregate). Filter tree with AND/OR
96
- combinators, group nesting, NOT toggles, column-vs-column comparisons,
97
- lambda `any`/`all` on collection-valued navs, and the full Dataverse
98
- query-function family (`Microsoft.Dynamics.CRM.*`). Virtualized results
99
- grid with infinite scroll via `@odata.nextLink`.
100
- - **Retrieve Single** — by primary key OR alternate key (composite alternate
101
- keys supported via `(col1='v1',col2='v2')` URL syntax).
102
- - **Retrieve NextLink** — paste a server-emitted `@odata.nextLink` URL to
103
- continue paging any prior query.
104
- - **Predefined Query** — execute saved-query (`?savedQuery=<id>`) and
105
- user-query (`?userQuery=<id>`) requests with a layout-aware results grid
106
- that mirrors the source view's column order from `layoutxml`.
107
-
108
- #### ✏️ Write group (5 modes)
109
-
110
- - **Create Record** — `POST /<set>` with metadata-driven `FieldSetEditor`,
111
- required-field guard, `Prefer: return=representation` toggle, return-set
112
- `$select`, Form ↔ JSON body-mode switcher (Monaco editor for JSON edits),
113
- and the `MSCRM.*` bypass-header family.
114
- - **Update Record** — `PATCH /<set>(<id>)` multi-field OR `PUT /<set>(<id>)/<col>`
115
- single-column. Diff view (before → after) with per-row drill-down that
116
- flips the method pill from PATCH to PUT automatically.
117
- - **Upsert Record** — full upsert / create-only / update-only / etag-guarded
118
- variants. By GUID OR alternate key.
119
- - **Delete Record** — `DELETE /<set>(<id>)` with a typed-confirmation safety
120
- affordance + cascade-impact preview. Single-property delete via
121
- `DELETE /<set>(<id>)/<col>` and `PUT /<set>(<id>)/<col>` with `{"value": null}`
122
- also supported.
123
- - **Merge Records** — `POST /Merge` for `account` / `contact` / `incident`
124
- with target + subordinate record cards, field-override matrix, and
125
- PerformParentingChecks / SuppressDuplicateDetection settings.
126
-
127
- #### 🔗 Relate group (2 modes)
128
-
129
- - **Associate** — collection-valued `POST /<set>(<id>)/<nav>/$ref` OR
130
- single-valued `PATCH @odata.bind`. Cardinality detected from metadata; verb
131
- auto-flips with the nav picker. Polymorphic lookups (Customer, Owner,
132
- `regardingobjectid`) emit the correct target-disambiguated
133
- `<navName>@odata.bind` binding shape.
134
- - **Disassociate** — collection-valued `DELETE /<set>(<id>)/<nav>(<targetId>)/$ref`
135
- OR single-valued `PATCH @odata.bind: null`. Same polymorphism story.
136
-
137
- #### ⚡ Execute group (3 modes)
138
-
139
- - **Execute Action** — OOB / Custom API / Custom Action invocation via
140
- bound `POST /<set>(<id>)/Microsoft.Dynamics.CRM.<Action>` OR unbound
141
- `POST /<Action>`. CSDL-driven parameter form with type-aware controls:
142
- EntityReference (record picker), EntityCollection (multi-record picker),
143
- Edm primitives (typed inputs), Enum / Status-code OptionSet (live-resolved
144
- picker), ComplexType (nested form). Required-first UX with optional params
145
- collapsed into an Accordion; Form ↔ JSON toggle via Monaco; Request body
146
- preview card.
147
- - **Execute Function** — OData function calls with `?@p1=...` parameter
148
- aliasing OR inline literal encoding. Colorized URL preview. Same
149
- type-aware controls as actions.
150
- - **Execute Workflow** — runs on-demand workflows via
151
- `POST /workflows(<id>)/Microsoft.Dynamics.CRM.ExecuteWorkflow` with the
152
- bound record id. Live picker over activated, on-demand process workflows
153
- (`statecode eq 1 and type eq 1 and ondemand eq true and category eq 0`).
154
-
155
- #### 💾 Binary group (3 modes)
156
-
157
- - **Manage File Data** — File-column upload / download / delete pipelines:
158
- - 3 upload paths — single-request `PATCH /<set>(<id>)/<col>` with
159
- `x-ms-file-name` header, chunked PATCH with session token in `Location`
160
- response, or `InitializeFileBlocksUpload` / `UploadBlock` /
161
- `CommitFileBlocksUpload` messages.
162
- - 4 download paths — single GET `/$value`, ranged GET with `Range` header,
163
- message-based block download via `InitializeFileBlocksDownload` /
164
- `DownloadBlock`, or `GetFileSasUrl` function for SAS-URL handoff.
165
- - Delete via `DELETE /<set>(<id>)/<col>` OR `POST /DeleteFile {FileId}`.
166
- - **Manage Image Data** — Image columns with thumbnail vs full-size download
167
- (`?size=full`), `CanStoreFullImage` awareness, and explicit pointers to
168
- the file-column messages path for full-size uploads. Three doc-equivalent
169
- delete forms (DELETE, PATCH-to-null, PUT-with-null).
170
- - **Manage Attachment / Note** — `activitymimeattachment.body` and
171
- `annotation.documentbody`. Inline base 64 (≲ 4 MB) OR
172
- `Initialize{Attachment|Annotation}BlocksUpload` /
173
- `Commit{Attachment|Annotation}BlocksUpload` messages. Single-request
174
- GET `/$value` OR message-based block download.
175
-
176
- #### 🔍 Cross-cutting capabilities
177
-
178
- - **Live Dataverse metadata** — tables, columns, relationships, alternate
179
- keys, action / function CSDL all fetched lazily from the host's
180
- `dataverseAPI`. Singleton TTL cache (5-minute TTL) with in-flight promise
181
- dedup. Type-specific column properties (Targets, OptionSet, MaxLength,
182
- MinValue / MaxValue, Format) loaded on-demand per column.
183
- - **Antipattern advisories** — real-time guidance per the Microsoft
184
- query-antipatterns doc: `FilteringOnCalculatedColumns`,
185
- `LargeAmountOfLogicalAttributes`, large-text `contains`, leading-wildcard
186
- rewrites. Surfaces inline at the source AND aggregates into an Advisory
187
- drawer in the URL bar.
188
- - **Polymorphic lookup support** — Customer, Owner, and multi-target
189
- lookups (`regardingobjectid`) emit the correct target-disambiguated
190
- `<navName>@odata.bind` binding shape automatically.
191
- - **Code generators** — every mode emits the same request as
192
- `Xrm.WebApi.online.execute` (single + `executeMultiple` batch), `fetch`,
193
- `curl`, and PowerShell `Invoke-RestMethod` snippets. Multi-request
194
- pipelines (chunked uploads, message-based binary ops) render as full
195
- ordered sequences in the Code tab.
196
- - **Saved-request library** — per-org localStorage persistence (50-entry
197
- cap per org), auto-suggested names, rename / delete / overwrite, dirty-state
198
- detection. Cross-tab sync via `storage` event listener.
199
- - **Results grid** — virtualized via `@fluentui-contrib/react-data-grid-react-window`
200
- for smooth scrolling of large result sets. Per-AttributeTypeCode cell
201
- renderers (Switch for Boolean, Badge for Picklist / Status, lookup
202
- formatted-value rendering, locale-formatted dates / numbers / money).
203
- Sort indicators driven by `$orderby` state. Search bar + density toggle.
204
- Infinite scroll fires `onLoadMore` 10 rows from the bottom; Retrieve-All
205
- walks every page until exhausted.
206
- - **PPTB host integration** — `isEmbedded()`-aware UI: theme syncs with the
207
- host, environment-aware URLs resolve via `getSession().environmentUrl`,
208
- header / theme controls hide when the host owns them. Bypass headers
209
- surface in the Code tab for external execution.
210
- - **Standalone mode** — runs in a regular browser via `npm run dev`. Execute
211
- returns `501 Not Implemented` (no host bridge), but the URL bar, body
212
- preview, and Code tab work end-to-end.
213
-
214
- #### 🎨 UX
215
-
216
- - **Required-first parameter UX** — required action params / required
217
- create columns surface in the main pane; optional params collapse into
218
- an Accordion with a "N of M set" badge.
219
- - **Two-dropdown cascading picker** — Scope (group / bound entity) +
220
- Operation for Execute modes. Picking a scope filters the operation list;
221
- scope change cascades-resets the operation.
222
- - **Form ↔ JSON toggle** — Monaco-backed JSON editor for action params and
223
- create / update bodies. Two-way live sync via `setValues` so edits in JSON
224
- reflect in the form and vice versa.
225
- - **Diff view in Update mode** — fetches the current record on entry,
226
- shows changed rows (before → after) with color coding, unchanged rows
227
- collapsed under a "Show unchanged" toggle.
228
- - **Operation-specific result narratives** — `WriteResultCard` renders
229
- per-operation success / failure copy (Create returns 204 with
230
- `OData-EntityId`; Delete returns 204; binary ops return 501 framed as
231
- "request built, run externally"; ETag-stale 412 has its own narrative).
232
- - **Sidebar with clause tree** — every mode has the same shell: target
233
- pane on the left, active editor in the center, URL bar + Execute on the
234
- bottom. Sections expand into clause sub-items with dirty markers.
235
- - **Theme support** — light + dark via Fluent v9 themes, with studio-owned
236
- CSS variables for brand / method palettes. Group-color cascade overrides
237
- Fluent's brand tokens per mode group (Read = blue, Write = green,
238
- Relate = purple, Execute = orange, Binary = brown-red).
239
-
240
- ### 🏗️ Technical
241
-
242
- - **TypeScript strict mode** — zero `any` (with eslint-escape-hatched
243
- exceptions documented inline). Discriminated unions for `ColumnMeta`,
244
- `FileUploadMethod`, `Advisory`, every clause node type.
245
- - **Vite 7** — production build splits Monaco into its own chunk
246
- (~3.7 MB on disk, lazy-loaded on Code-tab open). Main bundle ~1.87 MB
247
- raw / 494 KB gzipped.
248
- - **Fluent UI v9 (9.73)** — no v8 / v0 fallbacks. Custom `triggerButton`
249
- styling for `NavPathColumnPicker` uses `!important` over Fluent tokens
250
- to defeat the appearance-variant specificity in dark mode.
251
- - **`@pptb/types` 1.2.1** — official Power Platform ToolBox type
252
- definitions; `features.minAPI: "1.2.0"` in the manifest pins the
253
- required host version.
254
- - **AGPL-3.0-only** license.
255
-
256
- ### 🔗 References
257
-
258
- - [Use the Dataverse Web API](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/overview)
259
- - [Query antipatterns](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/query-antipatterns)
260
- - [File column data](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/file-column-data)
261
- - [Image column data](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/image-column-data)
262
- - [Attachment & Note file data](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/attachment-annotation-files)
263
- - [Use Web API actions](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/use-web-api-actions)
264
- - [Use Web API functions](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/use-web-api-functions)
265
- - [Associate / Disassociate](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/associate-disassociate-entities-using-web-api)
266
- - [Retrieve and execute predefined queries](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/retrieve-and-execute-predefined-queries)
1
+ # Changelog
2
+
3
+ All notable changes to Dataverse Request Studio will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.1.3] - 2026-06-10
9
+
10
+ ### ✨ Added
11
+
12
+ - **Auto-switch to Builder tab on sidebar item click**
13
+ ([#32](https://github.com/mohsinonxrm/pptb-mxrm-dataverse-request-studio/issues/32))
14
+ — clicking any sidebar nav item while on the Code or Results tab now
15
+ automatically switches the active tab back to Builder, making the selected
16
+ editor panel immediately visible. Previously the tab had to be switched
17
+ manually first. Applies across all 17 modes.
18
+
19
+ ### 🔧 Internal
20
+
21
+ - **Prettier added as dev tooling** — `.prettierrc` (single quotes, 2-space
22
+ indent, semis, `printWidth: 100`), `.prettierignore`, `.gitattributes` (LF
23
+ line endings repo-wide), and `.vscode/settings.json` (Prettier as default
24
+ formatter with `formatOnSave`). Added `format` and `format:check` npm
25
+ scripts. Full codebase normalised in one pass to eliminate quote-style
26
+ inconsistency introduced by a recent VS Code built-in formatter change.
27
+
28
+ ## [1.1.2] - 2026-06-08
29
+
30
+ ### 🐛 Fixed
31
+
32
+ - **`refreshAll()` race condition** (`metadataProvider.ts`) — the Settings
33
+ "Refresh metadata" button now drains any in-flight `buildTable` promises via
34
+ `Promise.allSettled` before clearing the cache. Previously an orphaned fetch
35
+ that settled after the clear could call `__registerLiveTable` with
36
+ pre-refresh data, silently overwriting the fresh registration.
37
+
38
+ - **Silent bad-hop in OData parse validation** (`odataParser.ts`) — when the
39
+ parser walks a nav-path `$filter` column and encounters an unknown or
40
+ non-ManyToOne navigation segment, it now emits an actionable warning (naming
41
+ the bad segment and its owner table) instead of silently skipping validation.
42
+ A separate warning is emitted when the related entity's metadata times out
43
+ during the walk.
44
+
45
+ - **`resolveNavPath` leaf lookup now matches `oDataName`** (`mock/metadata.ts`)
46
+ — the leaf-column search now also checks `ColumnMeta.oDataName` (e.g.
47
+ `_primarycontactid_value`) in addition to `logicalName`. This closes a gap
48
+ where a round-tripped or pasted OData `$filter` that preserved the lookup
49
+ wire form as the path leaf would resolve to `undefined`, causing the `$filter`
50
+ encoder to fall back to string-quoting a value that should be unquoted
51
+ (GUID / integer).
52
+
53
+ ## [1.1.1] - 2026-06-08
54
+
55
+ ### 🐛 Fixed
56
+
57
+ - **Custom OptionSet (and other typed) values incorrectly quoted as strings in
58
+ `$filter` over a lookup navigation** ([#33](https://github.com/mohsinonxrm/pptb-mxrm-dataverse-request-studio/issues/33)).
59
+ Filtering on a related-entity column via a nav path — e.g.
60
+ `msdyn_opportunityid/abc_salesstage eq 809770000` — emitted the value as a
61
+ quoted `Edm.String` (`'809770000'`), which Dataverse rejects with HTTP 500
62
+ / `0x80060888`. Standard columns appeared to work only by coincidence (the
63
+ root entity happened to own a same-named column). Root cause: the `$filter`
64
+ encoder resolved the leaf column against the **root** table instead of
65
+ walking the relationship to the **related** entity, so the leaf's
66
+ `AttributeType` never drove the quoting decision. The encoder now resolves
67
+ nav-path leaves against the correct related entity, so numeric/boolean/choice
68
+ types are emitted unquoted and strings/GUIDs are quoted, consistently.
69
+
70
+ ### ✨ Added / Changed (architecture)
71
+
72
+ - **Single, metadata-driven nav-path resolver (`resolveNavPath`)** in
73
+ `mock/metadata.ts` — now the one source of truth for resolving a
74
+ slash-delimited path (`nav/.../leaf`, alias-aware) to its leaf `ColumnMeta`,
75
+ owner table, visited chain, and first not-yet-loaded hop. The `$filter`
76
+ encoder (`colLookup`), the filter editor's leaf/pending-target resolution,
77
+ and the `$orderby` warnings all route through it, eliminating duplicated
78
+ walk logic that had drifted out of sync.
79
+ - **Related-entity metadata pre-warming (`useWarmReferencedTables`)** — the
80
+ Retrieve Multiple / Retrieve Single modes now walk the `$filter`, `$expand`,
81
+ `$apply`, and `$orderby` trees and pre-fetch the related entities they
82
+ reference. This makes correct type resolution independent of whether the
83
+ user opened the relevant editor — covering **saved-request reload**,
84
+ **pasted OData URLs**, and **direct Execute**. Targeted (only referenced
85
+ entities) and self-healing across multi-hop paths, so it stays clear of the
86
+ 100-concurrent-request cap.
87
+ - **Paste-OData parsing** now validates and pre-loads nav-path filter leaves
88
+ instead of skipping them.
89
+ - **Metadata cache TTL raised from 5 minutes to 1 hour**, with a new
90
+ **Settings → Refresh metadata** button (`metadata.refreshAll`) to force a
91
+ fresh pull after publishing schema changes mid-session.
92
+
93
+ ## [1.1.0] - 2026-05-25
94
+
95
+ ### ✨ Added
96
+
97
+ - **Scope-setup guidance banner** — when the tool loads with the entity scope
98
+ unconfigured (i.e. `entityScopeMode` is `publisher-solution` or
99
+ `solution-only` but no solutions have been selected), a contextual
100
+ `MessageBar` (warning intent) is shown at the top of the Target pane across
101
+ **all 14 modes** that use `TargetEditor`. The banner provides a mode-specific
102
+ hint and an **Open Settings** button that opens the Settings drawer directly.
103
+ It disappears automatically once the user selects a publisher / solution (or
104
+ switches to *All Entities*) — no dismiss cookie required, because the
105
+ condition is purely reactive to the persisted `DisplaySettings` state.
106
+
107
+ - **`OpenSettingsProvider` / `useOpenSettings` / `useRegisterOpenSettings`**
108
+ (`src/host/useOpenSettings.tsx`) — new React context that provides a
109
+ stable `() => void` callback to open the Settings drawer from any component
110
+ in the tree without prop-drilling. Uses a ref-based registration pattern
111
+ (zero provider re-renders). `FrameHeader` registers the callback on mount;
112
+ any consumer calls `useOpenSettings()` to get it.
113
+
114
+ - **`useScopedEntities` now exposes `needsSetup: boolean` and
115
+ `scopeMode: EntityScopeMode`** — consumers can detect the
116
+ unconfigured-scope condition and tailor guidance text accordingly.
117
+
118
+ ### 🔍 Settings persistence confirmation
119
+
120
+ - Verified that all `DisplaySettings` (scope mode, selected publisher /
121
+ solution IDs, display flags) are persisted via `window.toolboxAPI.settings`
122
+ under the namespaced key `pptb-dataverse-request-studio:displaySettings`.
123
+ The prefix is distinct from other PPTB tools (e.g. FetchXML Studio). No
124
+ changes to the persistence layer were required.
125
+
126
+ ---
127
+
128
+ ## [1.0.0] - 2026-05-24
129
+
130
+ Initial public release of Dataverse Request Studio — a metadata-driven studio
131
+ for composing, previewing, and executing Microsoft Dataverse Web API requests
132
+ inside Power Platform ToolBox.
133
+
134
+ ### ✨ Added
135
+
136
+ #### 📖 Read group (4 modes)
137
+
138
+ - **Retrieve Multiple** — full OData composer:
139
+ `$select` / `$filter` / `$orderby` / `$expand` / `$top` / `$skip` /
140
+ `$count` / `$apply` (groupby + aggregate). Filter tree with AND/OR
141
+ combinators, group nesting, NOT toggles, column-vs-column comparisons,
142
+ lambda `any`/`all` on collection-valued navs, and the full Dataverse
143
+ query-function family (`Microsoft.Dynamics.CRM.*`). Virtualized results
144
+ grid with infinite scroll via `@odata.nextLink`.
145
+ - **Retrieve Single** — by primary key OR alternate key (composite alternate
146
+ keys supported via `(col1='v1',col2='v2')` URL syntax).
147
+ - **Retrieve NextLink** — paste a server-emitted `@odata.nextLink` URL to
148
+ continue paging any prior query.
149
+ - **Predefined Query** — execute saved-query (`?savedQuery=<id>`) and
150
+ user-query (`?userQuery=<id>`) requests with a layout-aware results grid
151
+ that mirrors the source view's column order from `layoutxml`.
152
+
153
+ #### ✏️ Write group (5 modes)
154
+
155
+ - **Create Record** — `POST /<set>` with metadata-driven `FieldSetEditor`,
156
+ required-field guard, `Prefer: return=representation` toggle, return-set
157
+ `$select`, Form ↔ JSON body-mode switcher (Monaco editor for JSON edits),
158
+ and the `MSCRM.*` bypass-header family.
159
+ - **Update Record** — `PATCH /<set>(<id>)` multi-field OR `PUT /<set>(<id>)/<col>`
160
+ single-column. Diff view (before → after) with per-row drill-down that
161
+ flips the method pill from PATCH to PUT automatically.
162
+ - **Upsert Record** — full upsert / create-only / update-only / etag-guarded
163
+ variants. By GUID OR alternate key.
164
+ - **Delete Record** — `DELETE /<set>(<id>)` with a typed-confirmation safety
165
+ affordance + cascade-impact preview. Single-property delete via
166
+ `DELETE /<set>(<id>)/<col>` and `PUT /<set>(<id>)/<col>` with `{"value": null}`
167
+ also supported.
168
+ - **Merge Records** — `POST /Merge` for `account` / `contact` / `incident`
169
+ with target + subordinate record cards, field-override matrix, and
170
+ PerformParentingChecks / SuppressDuplicateDetection settings.
171
+
172
+ #### 🔗 Relate group (2 modes)
173
+
174
+ - **Associate** — collection-valued `POST /<set>(<id>)/<nav>/$ref` OR
175
+ single-valued `PATCH @odata.bind`. Cardinality detected from metadata; verb
176
+ auto-flips with the nav picker. Polymorphic lookups (Customer, Owner,
177
+ `regardingobjectid`) emit the correct target-disambiguated
178
+ `<navName>@odata.bind` binding shape.
179
+ - **Disassociate** — collection-valued `DELETE /<set>(<id>)/<nav>(<targetId>)/$ref`
180
+ OR single-valued `PATCH @odata.bind: null`. Same polymorphism story.
181
+
182
+ #### ⚡ Execute group (3 modes)
183
+
184
+ - **Execute Action** — OOB / Custom API / Custom Action invocation via
185
+ bound `POST /<set>(<id>)/Microsoft.Dynamics.CRM.<Action>` OR unbound
186
+ `POST /<Action>`. CSDL-driven parameter form with type-aware controls:
187
+ EntityReference (record picker), EntityCollection (multi-record picker),
188
+ Edm primitives (typed inputs), Enum / Status-code OptionSet (live-resolved
189
+ picker), ComplexType (nested form). Required-first UX with optional params
190
+ collapsed into an Accordion; Form ↔ JSON toggle via Monaco; Request body
191
+ preview card.
192
+ - **Execute Function** — OData function calls with `?@p1=...` parameter
193
+ aliasing OR inline literal encoding. Colorized URL preview. Same
194
+ type-aware controls as actions.
195
+ - **Execute Workflow** — runs on-demand workflows via
196
+ `POST /workflows(<id>)/Microsoft.Dynamics.CRM.ExecuteWorkflow` with the
197
+ bound record id. Live picker over activated, on-demand process workflows
198
+ (`statecode eq 1 and type eq 1 and ondemand eq true and category eq 0`).
199
+
200
+ #### 💾 Binary group (3 modes)
201
+
202
+ - **Manage File Data** — File-column upload / download / delete pipelines:
203
+ - 3 upload paths — single-request `PATCH /<set>(<id>)/<col>` with
204
+ `x-ms-file-name` header, chunked PATCH with session token in `Location`
205
+ response, or `InitializeFileBlocksUpload` / `UploadBlock` /
206
+ `CommitFileBlocksUpload` messages.
207
+ - 4 download paths — single GET `/$value`, ranged GET with `Range` header,
208
+ message-based block download via `InitializeFileBlocksDownload` /
209
+ `DownloadBlock`, or `GetFileSasUrl` function for SAS-URL handoff.
210
+ - Delete via `DELETE /<set>(<id>)/<col>` OR `POST /DeleteFile {FileId}`.
211
+ - **Manage Image Data** — Image columns with thumbnail vs full-size download
212
+ (`?size=full`), `CanStoreFullImage` awareness, and explicit pointers to
213
+ the file-column messages path for full-size uploads. Three doc-equivalent
214
+ delete forms (DELETE, PATCH-to-null, PUT-with-null).
215
+ - **Manage Attachment / Note** — `activitymimeattachment.body` and
216
+ `annotation.documentbody`. Inline base 64 (≲ 4 MB) OR
217
+ `Initialize{Attachment|Annotation}BlocksUpload` /
218
+ `Commit{Attachment|Annotation}BlocksUpload` messages. Single-request
219
+ GET `/$value` OR message-based block download.
220
+
221
+ #### 🔍 Cross-cutting capabilities
222
+
223
+ - **Live Dataverse metadata** — tables, columns, relationships, alternate
224
+ keys, action / function CSDL all fetched lazily from the host's
225
+ `dataverseAPI`. Singleton TTL cache (5-minute TTL) with in-flight promise
226
+ dedup. Type-specific column properties (Targets, OptionSet, MaxLength,
227
+ MinValue / MaxValue, Format) loaded on-demand per column.
228
+ - **Antipattern advisories** — real-time guidance per the Microsoft
229
+ query-antipatterns doc: `FilteringOnCalculatedColumns`,
230
+ `LargeAmountOfLogicalAttributes`, large-text `contains`, leading-wildcard
231
+ rewrites. Surfaces inline at the source AND aggregates into an Advisory
232
+ drawer in the URL bar.
233
+ - **Polymorphic lookup support** — Customer, Owner, and multi-target
234
+ lookups (`regardingobjectid`) emit the correct target-disambiguated
235
+ `<navName>@odata.bind` binding shape automatically.
236
+ - **Code generators** — every mode emits the same request as
237
+ `Xrm.WebApi.online.execute` (single + `executeMultiple` batch), `fetch`,
238
+ `curl`, and PowerShell `Invoke-RestMethod` snippets. Multi-request
239
+ pipelines (chunked uploads, message-based binary ops) render as full
240
+ ordered sequences in the Code tab.
241
+ - **Saved-request library** — per-org localStorage persistence (50-entry
242
+ cap per org), auto-suggested names, rename / delete / overwrite, dirty-state
243
+ detection. Cross-tab sync via `storage` event listener.
244
+ - **Results grid** — virtualized via `@fluentui-contrib/react-data-grid-react-window`
245
+ for smooth scrolling of large result sets. Per-AttributeTypeCode cell
246
+ renderers (Switch for Boolean, Badge for Picklist / Status, lookup
247
+ formatted-value rendering, locale-formatted dates / numbers / money).
248
+ Sort indicators driven by `$orderby` state. Search bar + density toggle.
249
+ Infinite scroll fires `onLoadMore` 10 rows from the bottom; Retrieve-All
250
+ walks every page until exhausted.
251
+ - **PPTB host integration** — `isEmbedded()`-aware UI: theme syncs with the
252
+ host, environment-aware URLs resolve via `getSession().environmentUrl`,
253
+ header / theme controls hide when the host owns them. Bypass headers
254
+ surface in the Code tab for external execution.
255
+ - **Standalone mode** — runs in a regular browser via `npm run dev`. Execute
256
+ returns `501 Not Implemented` (no host bridge), but the URL bar, body
257
+ preview, and Code tab work end-to-end.
258
+
259
+ #### 🎨 UX
260
+
261
+ - **Required-first parameter UX** — required action params / required
262
+ create columns surface in the main pane; optional params collapse into
263
+ an Accordion with a "N of M set" badge.
264
+ - **Two-dropdown cascading picker** — Scope (group / bound entity) +
265
+ Operation for Execute modes. Picking a scope filters the operation list;
266
+ scope change cascades-resets the operation.
267
+ - **Form ↔ JSON toggle** — Monaco-backed JSON editor for action params and
268
+ create / update bodies. Two-way live sync via `setValues` so edits in JSON
269
+ reflect in the form and vice versa.
270
+ - **Diff view in Update mode** — fetches the current record on entry,
271
+ shows changed rows (before → after) with color coding, unchanged rows
272
+ collapsed under a "Show unchanged" toggle.
273
+ - **Operation-specific result narratives** — `WriteResultCard` renders
274
+ per-operation success / failure copy (Create returns 204 with
275
+ `OData-EntityId`; Delete returns 204; binary ops return 501 framed as
276
+ "request built, run externally"; ETag-stale 412 has its own narrative).
277
+ - **Sidebar with clause tree** — every mode has the same shell: target
278
+ pane on the left, active editor in the center, URL bar + Execute on the
279
+ bottom. Sections expand into clause sub-items with dirty markers.
280
+ - **Theme support** — light + dark via Fluent v9 themes, with studio-owned
281
+ CSS variables for brand / method palettes. Group-color cascade overrides
282
+ Fluent's brand tokens per mode group (Read = blue, Write = green,
283
+ Relate = purple, Execute = orange, Binary = brown-red).
284
+
285
+ ### 🏗️ Technical
286
+
287
+ - **TypeScript strict mode** — zero `any` (with eslint-escape-hatched
288
+ exceptions documented inline). Discriminated unions for `ColumnMeta`,
289
+ `FileUploadMethod`, `Advisory`, every clause node type.
290
+ - **Vite 7** — production build splits Monaco into its own chunk
291
+ (~3.7 MB on disk, lazy-loaded on Code-tab open). Main bundle ~1.87 MB
292
+ raw / 494 KB gzipped.
293
+ - **Fluent UI v9 (9.73)** — no v8 / v0 fallbacks. Custom `triggerButton`
294
+ styling for `NavPathColumnPicker` uses `!important` over Fluent tokens
295
+ to defeat the appearance-variant specificity in dark mode.
296
+ - **`@pptb/types` 1.2.1** — official Power Platform ToolBox type
297
+ definitions; `features.minAPI: "1.2.0"` in the manifest pins the
298
+ required host version.
299
+ - **AGPL-3.0-only** license.
300
+
301
+ ### 🔗 References
302
+
303
+ - [Use the Dataverse Web API](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/overview)
304
+ - [Query antipatterns](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/query-antipatterns)
305
+ - [File column data](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/file-column-data)
306
+ - [Image column data](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/image-column-data)
307
+ - [Attachment & Note file data](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/attachment-annotation-files)
308
+ - [Use Web API actions](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/use-web-api-actions)
309
+ - [Use Web API functions](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/use-web-api-functions)
310
+ - [Associate / Disassociate](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/associate-disassociate-entities-using-web-api)
311
+ - [Retrieve and execute predefined queries](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/retrieve-and-execute-predefined-queries)