How to Prevent Simultaneous Record Updates in Dataverse Using ConcurrencyBehavior?
Table of Contents
Question
You are building an application with Dataverse and the Organization service.
Multiple users are updating the same record on a custom table simultaneously.
You need to ensure that when a user saves their changes, they are prevented from updating the record if another user has updated it.
What should you do?
Select only one answer.
A. Set SuppressDuplicateDetection to false.
B. Include the UpdateRequest in an ExecuteAsync call.
C. Include the UpdateRequest in an ExecuteTransaction call.
D. Set ConcurrencyBehavior to IfRowVersionMatches.
Answer
D. Set ConcurrencyBehavior to IfRowVersionMatches.
Explanation
This item tests the candidate’s knowledge of optimizing performance, concurrency, transactions, and batching.
Dataverse provides optimistic concurrency checking on Dataverse custom tables. This concurrency detects if a row has been changed since it was retrieved. In an UpdateRequest, you can control how the update performs by setting ConcurrencyBehavior. If you use IfRowVersionMatches, an exception fault is raised if another user has changed the row.
ExecuteTransaction and ExecuteAsync will perform the UpdateRequest but will use the default update behavior, which is to overwrite the row on the table. SuppressDuplicateDetection is used for detecting duplicate rows when a record is created or updated.
Microsoft Power Platform Developer PL-400 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft Power Platform Developer PL-400 exam and earn Microsoft Power Platform Developer PL-400 certification.