Salesforce Fact #317 | Current user record access check in LWC

Do you know we can query UserRecordAccess object to know what all access a user has on a particular record.

Suppose, we have a use case in LWC where we need to know whether the current user has edit access on the current record. We can write a simple apex function which will take the userid and recordid as input and will return whether the user has edit access.

Attached are the screenshots.







Comments

Post a Comment

Popular posts from this blog