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 Platform Community / Forums / Power Apps / PCF Control Subgrid
Power Apps
Unanswered

PCF Control Subgrid

(0) ShareShare
ReportReport
Posted on by

Hi,

 

We have a requirement to build PCF Subgrid control. This control will be added to an Opportunity entity and the PCF subgrid should show all the related Opportunity for the current opportunity in a subgrid. The subgrid should list down the records even if the user does not have permission to view that related opportunity record but some fields must be masked based on the column condition. The PCF should run under Admin Context so that it will return all the related opportunities so we need to embed code to retrieve the data as well.

 

I am totally new to PCF. Dont know where to start. Any help would be appreciated.

 

Thanks.

I have the same question (0)
  • Guido Preite Profile Picture
    1,490 Super User 2024 Season 1 on at

    afaik inside a PCF control there isn't a way to run the context in higher privileges of the current user

  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    Hello,

    I hope you understand that your control is the source of headache for the administrator that will support that system. There will be a lot of calls and email - I see this opportunity in the control but I can't find it in the system? Your system is broken.

    Anyways, sometimes requirements do not make a lot of sense. Here is how you can make it work:

    1. Create an Action/Custom API that will accept the set of parameters required for the Querying of the opportunities and will return the collection of opportunities that were retrieved. The trick here is to use elevated privileges to query the data in the serverside code (check Impersonation in plugins and/or Instantiation System-level Organization Service in plugins).

    2. Use that Action/Custom API from the code of PCF and show the data.

     

    Good luck.

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    Hi @jayakumarjd , 

     

    Totally agree with @a33ik .

    But maybe you can try again to talk to your solution architect/ customer. Maybe it's still possible to extend the rights on all records, and use the field level security to hide the "secret" fields where needed. The user will see that data inside the Lookup anyways.

    Otherwise, maybe you can consider a Virtual Table, where the data is taken from Opportunity, but you show only the columns which everybody can see.

     

    But if it has to be a PCF, I'm afraid you would need some kind of impersonation, like @a33ik posted above.

  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    @DianaBirkelbach virtual entity for that use case is pure gold but as always with consequences 🙂 Brilliant idea.

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 Apps

#1
11manish Profile Picture

11manish 510

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 281

Last 30 days Overall leaderboard