function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kloudrootkloudroot 

delete without profile perms in apex

Hi -  

I am developing a managed package.  It is complete, but during testing we realized that users who can't delete certain objects are unable to use the app.  I want them to be able to use it WITHOUT the delete permission.  I was wondering if there is a way to overide their CRUD perms in Apex.  I tried System.runsAs() but that only works for tests.  Any suggestions would be greatly appreciated.  

 

 

Starz26Starz26

you will have to modify your code to check for portal user and adjust as necessary......you cannot override their permissions.