Updating Dataverse records by alternate key with UpdateRequest and UpsertRequest
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.
Community Votes
100% of anonymous learners picked answer AB. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
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.
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.
Community Discussion (3 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
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
Related Analysis
Practice All PL-400 Questions
Access 85 questions with complete answers and detailed explanations.
View Full PL-400 Practice Test →