Announcements
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.
afaik inside a PCF control there isn't a way to run the context in higher privileges of the current user
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.
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.
@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.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 510
WarrenBelz 426 Most Valuable Professional
Vish WR 281