SEARCH THE COMMUNITY

Find an existing answer

2 results for “optimistic concurrency”

CommunityD365FO X++: When to use `while select forUpdate` vs optimistic concurrency to avoid deadlocksIn Dynamics 365 Finance and Operations (X++), what are the correct patterns for updating rows that are first selected inside a `while select` loop using `forUpdate` (or `selectForUpdate`), and how can I avoid deadlocks/lock escalation when multiple transactions update the same reCommunityD365FO X++ optimistic concurrency: how to handle UpdateConflict using reread/orig() and decide between selectForUpdate vs retryIn D365FO X++, I’m seeing `UpdateConflict` exceptions in a high-concurrency workflow when updating the same record(s). I currently read the record with a normal `select`, store some fields from the buffer, and later call `update()`—but under concurrency it fails. What’s the reco