Q: 6
Universal Containers requested to leverage Lightning Web Components (LWC) to improve support reps’ user experience. LWC will be used as view layer, and Apex classes will have the business logic. Which attention points should the development team consider when implementing this solution?
Options
Discussion
Option A
A
Probably A. Apex runs in system mode so extra care for record-level visibility. Unless you enforce sharing, users might see too much.
Its C for me, since checking isShareable and isEditable covers the field security aspect that LWC might expose. Not totally sure though.
C tbh, since exposing fields in LWC often leads to FLS issues if you forget those is* checks. I know record-level sharing is a problem but field security gets overlooked with all those UI components. Might be missing something subtle here.
Not B here. Test classes with runAs set user context but don't actually enforce sharing-it just lets you run as another user for testing. The real concern is system mode in Apex behind LWC, so enforcing record visibility (A) is what devs need to watch for. C looks tempting but that's field-level, not record-level. Anyone see it differently?
Test classes with runAs actually don't enforce sharing, only user context. So A is the right call here.
Seriously, why does Salesforce keep tossing these System Mode vs. FLS scenarios at us? A imo
I’d go with C on this one. Field-level permissions should always be checked in Apex too, especially since LWC might display fields a user isn’t allowed to see or edit. I think both record and field security matter, but C calls out those FLS checks. Anyone disagree?
Man, Salesforce always makes these sharing vs. FLS questions confusing. I'm picking C because 'isSharable', 'isEditable', and 'isCreatable' definitely check for field-level permissions, which is a big deal when you're exposing data through LWC. I know record visibility matters too but I thought field security trips folks up more often. Anyone else read it the same way, or am I missing something?
Be respectful. No spam.