While developing an Apex class with custom search functionality that will be launched from a Lightning Web Component, how can the developer ensure only records accessible to the currently logged in user are displayed?
I've done something similar before. I'd use the WITH SECURITY_ENFORCED clause in the SOQL query to automatically apply the user's permissions. Should be a straightforward fix.
This seems tricky. I'll need to research how to properly handle user permissions in an Apex class that's called from a Lightning Web Component. Might take some time to figure out the right solution.
Okay, I think I've got a plan. I'll use the System.UserInfo class to get the current user's ID, then build a dynamic SOQL query to only return records they have access to.
Filiberto
15 days agoArthur
20 days agoLamonica
25 days agoPamella
1 month agoTyra
1 month agoThora
1 month agoVilma
2 months ago