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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Pages
Unanswered

Entity permission

(0) ShareShare
ReportReport
Posted on by

Hi All,

 

I have used entity permissions to restrict access to the custom entities records.

 

Is there any option to expose only selective fields from a record in edit mode and retaining the rest of the fields in read only mode.

 

Thanks,

KJ

Categories:
I have the same question (0)
  • justinburch Profile Picture
    Microsoft Employee on at

    Hi @Jeyaram19,

    Is your goal to change these fields based on the user's permissions/web role? If not, then just change the fields to "Read Only" (Lock Field) in your form editor - the Portal will honor this. Ideally, you're already using a copy of your standard form for the Portal anyway.

    Otherwise, consider using the tips on my blog (https://justinburch.com/portal-security-3/ - scroll down to the "Web Template" sample) to have multiple Entity Forms/Web Forms that are chosen based on Web Role (instead of a field), which each point to a different actual form or form tab (if you aren't showing multiple tabs currently).

  • oliver.rodrigues Profile Picture
    9,457 Most Valuable Professional on at

    Hi @Jeyaram19 

     

    Another way you can achieve this is via JavaScript, you can get the user roles using JS/Liquid and then set the fields enabled/disabled:

    $(document).ready(function () {
    
     var roles = "{{ user.roles }}";
     var isAdmin = "{{ user | has_role: 'Administrators' }}"
    
     console.log("Is Admin: " + isAdmin);
     console.log("User Roles: " + roles);
    
    });

    Note that this method might be simpler, but taking a quick look at the method proposed by @justinburch, it seems to be safer, so just take that into account


    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
rezarizvii Profile Picture

rezarizvii 71

#2
DP_Prabh Profile Picture

DP_Prabh 36

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 32 Most Valuable Professional

Last 30 days Overall leaderboard