Skip to content

Ask before Dataverse createRow like an action instead of reading the service document - #444

Merged
tnkuehne merged 1 commit into
mainfrom
dataverse-createrow-asks
Nov 27, 2026
Merged

tnkuehne merged 1 commit into
mainfrom
dataverse-createrow-asks

Conversation

@tnkuehne

Copy link
Copy Markdown
Contributor

OData addresses a table and an unbound action the same way: POST /accounts creates a row, and POST /WinOpportunity runs an action. createRow was classified as a creation, which runs without asking at the default approval level. To keep an action from running under that class, the template read the environment's service document before every createRow and rejected names it did not list as entity sets. That read cost about half a second per save. It also could not settle the question for good, since tables and actions can change between the read and the request.

Now createRow asks like an action, because its address may name one, and nothing reads the service document. The same applies to a batch request that POSTs to a name at the root. createRelatedRow and a batch's POST through a navigation property stay creations: they address an unqualified navigation property, and bound actions are always qualified by their namespace. The existing syntactic check of the key and property name enforces this.

Apps that call the template answer its question themselves, since the person's tap is the approval, so their saves no longer wait for the service document. Agents over MCP are now asked before createRow at the default level. The default level's description now says which additions run at once.

Tests check that createRow, also with an action's name, asks before anything reaches Dataverse; that a column is created through its table's navigation property at once; and that a batch POST at the root asks.

…service document

OData addresses a table and an unbound action alike, so createRow and a
batch's POST at the root may run an action. They now ask like one, and no
request reads the environment's service document first. createRelatedRow
stays a creation: an unqualified navigation property is never a bound
action.
@tnkuehne
tnkuehne merged commit c913de4 into main Nov 27, 2026
9 of 11 checks passed
@tnkuehne
tnkuehne deleted the dataverse-createrow-asks branch November 27, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant