web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / RecordInfo - when does...
Power Apps
Suggested Answer

RecordInfo - when does it work?

(0) ShareShare
ReportReport
Posted on by 379

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?

 

Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,360 Super User 2025 Season 2 on at

    Hi,

     

    My guess is that you haven't done a Refresh(DataSource), so it has the old stuff cached.


    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • Len C Profile Picture
    379 on at

    I've tried Refresh()ing the dataset, ad nauseum. I also tried firing RecordInfo(LookUp('table', id=Gallery1.Selected.id)) so that the first argument to RecordInfo is called with a 'fresh record' straight from the data source.

     

    Based on further testing, it looks like RecordInfo caches results, AND DOES NOT EVER REFRESH THOSE RESULTS, EVEN WHEN THE DATASET IS REFRESHED. It only refreshes with a browser Refresh - i.e., leave the app and come back in.

     

    This makes RecordInfo pretty useless. If someone has an app open all day, and record permissions are changing due to data being updated, they will only see the 'correct' answer for permissions for a given record ONCE - the first time the app calls RecordInfo for that record. After that, the first answer will always be returned.

     

    I can see how Microsoft would have wanted to aggressively cache RecordInfo() results, as many devs will probably tie control Visibility and DisplayMode to RecordInfo permission checks. Resulting in many, many calls to the datasource without caching. But they purposefully left this issue in? 

  • mitchbaker Profile Picture
    2 on at
    I have this same problem... I change the owner and the permissions do change but RecordInfo seems to cache the old permissions which gives the user running the app an incorrect view, albeit unable to actually use those permissions.
     
    Tried a Refresh() etc and a lookup on the record.
  • Suggested answer
    powerJu Profile Picture
    34 on at
    I was having the same issue, but it seems take just few minutes to refresh it. 
    In my case I was using it to make a button visible so if the user make a change in the record that sends the ownership to other use and give him read access only (using Power Automate) - User should not see some buttons. But if user goes quickly to the record they will see it.
    It takes 2 minutes to them to disappears.
    So I used the 
    If(IsError(Actions that you want button to perform), 
    Notify(
            "You don't have privileges to perform this action. ",
            NotificationType.Error
        ));

    It prevents user to click and make it work.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard