I am trying to use RecordInfo on a Dataverse table to determine if the user has Delete permissions on a record. It does not seem to return the correct answer when the record ownership has been changed in one application session.
The current record is in a variable called 'currentRecord'. PowerApps correctly evaluates this when the user comes into the app fresh.
The app lets the user submit the record to an approver - upon which the Owner is changed, and the user loses Update/Delete access, as I can confirm using 'Check Access' in a model-driven view of the table (in another app). But RecordInfo keeps saying the user has Delete access.
I've tried refreshing the dataset, and using LookUp to pull in a 'fresh' copy of 'currentRecord' before doing the RecordInfo check - even calling RecordInfo with a LookUp as the first argument. Nothing changes. The user has to exit the app, and re-enter, before the answer is correct.
The inverse also happens: The user can 'Recall' the record, in which case Ownership is transferred back to the user (I use Flows and Process Actions to change the owner on 'Recall'). But RecordInfo will never return 'true' for the 'Delete' permission, unless the user exits and re-enters the app.
Any insight on what PowerApps is actually doing under the covers here?