Applies to Product - Microsoft Dataverse
What’s happening?
The customer encounters an error message stating that the entity 'Sample entity' with a specific ID does not exist, despite the record being present in the database.
Reason:
This arises because the record creation is part of a synchronous plugin execution. The created record can be retrieved by another separate request or transaction before the insert query is committed to the database. If the creation occurs within a synchronous plugin, the commit should happen after the entire transaction is completed. Additionally, the use of "fetch no-lock='true'" in the FetchXml query allows for reading uncommitted records, which can lead to this error.
Resolution:
- Confirm that the record was created successfully before the update request was sent.
- Check the execution mode and plugin stage being used to create and update the 'Sample entity' table.
- If the "fetch no-lock='true'" setting is being used in the FetchXml, consider removing it to prevent reading uncommitted records.
- Ensure that the update request is sent only after the synchronous plugin has completed its execution and the record is fully committed to the database.
