Repository navigation
Ask before Dataverse createRow like an action instead of reading the service document - #444
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OData addresses a table and an unbound action the same way:
POST /accountscreates a row, andPOST /WinOpportunityruns an action.createRowwas 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 everycreateRowand 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
createRowasks like an action, because its address may name one, and nothing reads the service document. The same applies to abatchrequest that POSTs to a name at the root.createRelatedRowand 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
createRowat 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.