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
Ross.ax1563Ross.ax1563 

Modify Custom Object Permission via Apex

Hi All

 

Is it possible to edit a Profile's access rights to an Object (custom and standard) via Apex?

 

Thanks

Ross

 

souvik9086souvik9086

No, I think its not possible to make such changes through your apex code. You have to go to your Profile to do that.

 

If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.

Thanks

SaraagSaraag

I understand this doesn't exactly fit into what you're asking but, when I had a similar situation I gave the user edit access on the object and used apex based sharing to control access adhoc. May be you can try something like this?