Updating Dataverse records by alternate key with UpdateRequest and UpsertRequest

PL-400 By islever Editorial Last updated

Implement synchronization for Dataverse data

Short answer

AB Both UpdateRequest and UpsertRequest can target an existing row by its alternate key, letting you update records without knowing the primary key.

Question

You develop code that will perform an update to existing records in a table. The update must occur based on the alternate key configured for the table. You need to perform the update. Which two requests should you use? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.
  1. UpdateRequest Correct Answer
  2. UpsertRequest Correct Answer
  3. CreateRequest
  4. RetrieveRequest

Key Takeaways

Alternate keys let you perform updates (and upserts) without the primary key. UpdateRequest updates the matching row; UpsertRequest updates it if it exists (or inserts if not) — both resolve the target via the alternate key, which is what the scenario requires.

When a table has an alternate key, you can address an existing row by that key instead of its primary key. Both UpdateRequest and UpsertRequest accept the alternate-key values to locate the row and apply the update, so either request satisfies the requirement.

Common mistake: Choosing CreateRequest (C) — it inserts a new row rather than updating an existing one, so it does not meet an 'update existing records' requirement. RetrieveRequest (D) only reads, it does not update.

Expert Analysis

Why the Answer Is Correct

With an alternate key defined on the table, UpdateRequest can target the existing row using the alternate-key values instead of the primary key, and UpsertRequest can likewise update the row (inserting only if it does not exist). Both requests natively support alternate-key addressing, so A and B are correct.

Why the Other Options Are Wrong

CreateRequest (C) always creates a new record and cannot update an existing one by alternate key. RetrieveRequest (D) only reads data and performs no update. Neither meets the update requirement.

Community Comment Notes

Juan0414 (likes=1) confirms A and B are correct. sudoaptupgrade (likes=3) agrees the given answer (UpdateRequest and UpsertRequest) is correct.

Official Reference

https://learn.microsoft.com/en-us/power-apps/developer/data-platform/define-alternate-keys-entity

This link opens the official vendor documentation in a new tab.

Community Votes

AB
100%

100% of anonymous learners picked answer AB. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 3 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 3

  1. TylerPet99 👍 1
    The correct answer is UpdateRequest & UpgradeRequest.
  2. sudoaptupgrade 👍 3
    Given answer is correct
  3. Juan0414 👍 1
    Correct!

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Practice All PL-400 Questions

Access 85 questions with complete answers and detailed explanations.

View Full PL-400 Practice Test →

← Back to PL-400 Study Guide