exam questions

Exam PL-400 All Questions

View all questions & answers for the PL-400 exam

Exam PL-400 topic 7 question 17 discussion

Actual exam question from Microsoft's PL-400
Question #: 17
Topic #: 7
[All PL-400 Questions]

HOTSPOT -
An online store has a custom web page that allows customers to place their orders against a Microsoft Dataverse database that uses custom products. The custom web page uses Web API patterns to create and update records.
Customers report that orders can be placed for out-of-stock items.
You need to update the page code to ensure that inventory is available before confirming an order.
Which pattern should you use for each step? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: IsOptimisticConcurrencyEnabled
On a multi-threaded and multi-user system like Power Apps, operations and data changes often happen in parallel. A problem arises when two or more update or delete operations on the same piece of data happen at the same time. This situation could potentially result in data loss. The optimistic concurrency feature provides the ability for your applications to detect whether a table record has changed on the server in the time between when your application retrieved the record and when it tries to update or delete that record.

Box 2: If-Match: Etag -
Use If-Match and If-None-Match headers with ETag values to check whether the current version of a resource matches the one last retrieved, matches any previous version or matches no version. These comparisons form the basis of conditional operation support. Dataverse provides ETags to support conditional retrievals, optimistic concurrency, and limited upsert operations.
Reference:
https://docs.microsoft.com/en-us/powerapps/developer/data-platform/optimistic-concurrency https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/perform-conditional-operations-using-web-api

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Net_IT
Highly Voted 1 year, 2 months ago
1. ChangeTrackingEnabled:track changes to records in the inventory table, including modifications to inventory quantities. By enabling change tracking, you can efficiently check the current inventory status before retrieving the inventory record. 2. If-Match: Etag.If-Match header with the Etag value when making a PATCH request to update the quantity on the inventory record. This ensures that the update is only applied if the inventory record's Etag (entity tag) matches the one you provide in the request header. If the Etag doesn't match, it means that the inventory record has been modified by someone else since you retrieved it, and the update will fail. This helps prevent concurrent updates and ensures data consistency.
upvoted 7 times
hai297
8 months, 3 weeks ago
the context here is concurrency requests, so I think the answer is correct IsOptimisticconcurrencyEnabled and If-Match eTag
upvoted 3 times
...
...
Juan0414
Most Recent 3 months, 2 weeks ago
IsOptimisticConcurrencyEnabled If-Match: Etag https://learn.microsoft.com/en-us/power-apps/developer/data-platform/optimistic-concurrency https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/perform-conditional-operations-using-web-api
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...