8 min readRishi

Perform a Changeset Request: Two Add a New Row Actions Are Two Transactions

In this series: Power Automate gotchas

Perform a Changeset Request: Two Add a New Row Actions Are Two Transactions

The warehouse posted customer US-001. The flow ran Add a new row on Accounts, took accountid, and bound the contact with accounts(that-guid) the way Add a new row requires. The contact action turned red: a required custom column was empty. The account row was already in Dataverse. The warehouse retried. Now there are two accounts for US-001. Add a new row commits when that action succeeds. The next action is a second transaction. Perform a changeset request is the scope that makes those two writes one commit — and it only accepts Add, Update, and Delete a row. List rows inside it is not how you "check first."

That is the whole property. Two green Dataverse actions in sequence are two commits. A failed second action does not undo the first. The transaction is the changeset, not the run.

What the action actually is

Perform a changeset request is a Dataverse connector scope. You drop other Dataverse actions inside it. Dataverse executes those writes as one OData changeset: all of them commit, or none of them do. In run history it is one parent action. Inner Add / Update / Delete steps show as children. Their failure is the changeset's failure.

The connector documents three inner actions. That list is the contract:

Allowed inside the changesetNot a Dataverse write in this scope
Add a new rowList rows, Get a row by ID
Update a rowRelate rows, Unrelate rows
Delete a rowPerform a bound or unbound action
Upload a file or image, Search rows
Compose, Condition, Apply to each, Send an email

List rows is a GET. An OData changeset is for data modification. Stuffing a Get in front of Add "so we know the id" is the same find-or-create you already do before the scope. Branch on empty outside. Then enter a changeset that only writes.

Relate rows is Associate, not Update of a lookup. Unrelate is a $ref delete. File columns are their own messages. If the unit of work needs an N:N link or a file in the same commit as the parent create, this connector scope cannot express it. Drop to HTTP $batch and a changeset you author yourself.

Two Adds, one commit

The pattern the warehouse flow wanted is parent then child, bound, with no orphan account if the child fails.

Condition: empty(outputs('List_rows')?['body/value'])
  If yes:
    Perform a changeset request
      Add a new row  (Accounts)
        Account Name  Contoso Ltd
        Account Number  US-001
      Add a new row  (Contacts)
        Last Name  Okoye
        Company Name (Accounts)
          concat('accounts(', outputs('Add_a_new_row')?['body/accountid'], ')')
  If no:
    Perform a changeset request
      Add a new row  (Contacts)
        Company Name (Accounts)
          concat('accounts(', first(outputs('List_rows')?['body/value'])?['accountid'], ')')

List rows on accountnumber eq 'US-001' sits above the changeset. Row count 2, then fail closed on duplicates, same as the Get a row post. The changeset never searches. It writes.

Inside the scope, the second Add a new row can use the first action's outputs. The connector assigns Content-ID under the hood, the same $1 bind the HTTP post spells out by hand. You still write accounts(guid), not a raw GUID and not the account name.

Do not Add the account, leave the changeset, then Add the contact. That is the original bug with extra nesting. Do not Relate after the changeset if you already bound parentcustomerid on create.

Update a row in the same changeset stamps a column that depends on the new id: create the account, create the contact, PATCH the account's primarycontactid with contacts(the-new-contactid). All three succeed or Dataverse keeps none of them.

What rolls back, and what cannot

A required-column miss, a plugin InvalidPluginExecutionException, a duplicate alternate key, a lookup bind to a missing GUID — any of those on any inner action fails the changeset. Dataverse rolls back every write that scope submitted. The account from the first Add is gone. Plugin Trace Log for the sync pipeline is the exception that aborted the transaction, not a committed row you can Get.

Synchronous plug-ins and real-time workflows run inside that transaction. If contact create throws, the account create is undone too. Register the step that must veto the whole unit on the inner table, not in a separate flow.

Asynchronous plug-ins and background workflows run after a successful commit. A rolled-back changeset never happened for them. Do not wait on an async plugin to "fix up" a failure. There is nothing in Dataverse to fix.

Everything that is not a Dataverse write in this scope is outside the transaction even when it sits next in the run:

  • Send an email, post to Teams, HTTP to another system — a later changeset failure will not unsend the mail. Put notification after a succeeded changeset.
  • A parallel branch next to the changeset is a second timeline, not part of the commit.
  • Apply to each around a changeset is N transactions, one per item. Item 7 can fail after items 1–6 committed.

Configure run after on the Perform a changeset request action. Inner Add a new row does not get a "has failed → create anyway" path that still shares the commit. A scope with run after around the changeset is for logging and Terminate, not for a compensating Add you hoped was still in the transaction.

Timeouts still need a business key

A changeset that returns a clean 4xx from Dataverse did not commit. Retry is safe in the sense that nothing landed. A changeset that times out, or fails with a 5xx after the connector already sent the batch, is the same uncertainty as any other write: you do not know whether Dataverse committed.

Retry policy on the changeset action will send the whole batch again. Put an alternate key on accountnumber so the second attempt collides instead of inserting. The changeset then fails closed on the duplicate, which is a Condition you can see, not a silent second customer.

There is no Upsert a row inside this scope. Alternate-key PATCH is an HTTP address, and Send an HTTP request is not one of the three inner actions. For "create or update this account, then create the contact, all or nothing," the designer changeset is the wrong tool. That payload belongs in HTTP $batch: PATCH accounts(accountnumber='US-001'), then POST contacts with a $ Content-ID bind.

Dataverse caps a changeset at 1,000 operations. If the unit of work is two or three rows, stay in Perform a changeset request. If it is a file of line items, you are in $batch or CreateMultiple, and you chunk on purpose.

When you should not wrap it

One Add a new row of a contact whose account id the trigger already has does not need a changeset. It is already one statement.

A Get, then an Update, is two round trips and not a transaction. Put the Update in a changeset only when it shares the commit with another write. Optimistic concurrency is Row version / If-Match on that Update, not a changeset of one.

Clearing a lookup is still Unrelate or an HTTP DELETE to $ref, not an empty box on Update a row. Those messages are outside this scope. Sequence them after a committed changeset, or use HTTP so they sit in the same multipart changeset as the other writes.

Child flows do not inherit the parent's changeset. The child's Add a new row is its own commit, in its own run. If the parent then fails, the child row stays. Keep the Dataverse unit of work in one flow, or admit it is two systems and design the compensating update.

What to put in the scope

  • Add a new row, Update a row, Delete a row. Bind lookups as entityset(guid). Use inner outputs for ids this changeset is creating.
  • List rows, Get a row, Conditions, and loops outside. Search, then write.
  • Notifications after a succeeded changeset. Never before, never beside.
  • Alternate keys on the business identifier so a retried changeset does not insert a twin.
  • HTTP $batch when you need GET-then-write in one payload, upsert, Relate, files, or more rows than a handful.

Two Add a new row actions on the canvas are two commits. Perform a changeset request is how you tell Dataverse they are one. List rows does not go in that box. The contact failure that used to leave an extra account then leaves nothing — which is the outcome the retry was supposed to be able to survive.

Keep reading

Newsletter

New posts, straight to your inbox

One email when a new post goes up. Double opt-in, unsubscribe anytime. Not a daily digest.

Comments

  • No comments yet. Be the first.