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
Gabriel Meneses 10Gabriel Meneses 10 

Apex classes not working if not a Sys Admin

Good afternoon everyone, I am currently running in an issue with an Apex Class. In my case, the custom delete button for the opportunity object is not working on any profile outside of Sys Admin. I've checked the Apex Class Security and all is good there, as well as the API enabled for other profiles but nothing seems to allow it to work under any other profile. Does anyone have any ideas on what could be prohibiting this from functioning?

Thank you
Best Answer chosen by Gabriel Meneses 10
Alap MistryAlap Mistry
Hello Gabriel Meneses 10,
Try this method. Setup > Manage Users > Profiles > Select profie (Your custom or standard profile). Under Enabled Apex Class Access (which is at bottom of page), Click Edit. Move your Apex class Available Apex Classes to Enabled Apex Classes. Then save it. Test your button with changed profile which has your apex class access.
If error is occur, then post here. If it is useful, then mark it as best answer (for close this thread).
Regards,
Alap Mistry

All Answers

Raj VakatiRaj Vakati
Hi Gabriel  ,

Can you please check the custom delete button apex class and Page Access to the other profiles?
Go to Set up -> develop -> Apex Classes-->  Security  --> Add profiles from the list 
 
Gabriel Meneses 10Gabriel Meneses 10
Rajamohan, I have it so that many other profiles have access to that Apex Class within its security settings. Is there something specific that I should be looking for? 
Alap MistryAlap Mistry
Hello Gabriel Meneses 10,
Try this method. Setup > Manage Users > Profiles > Select profie (Your custom or standard profile). Under Enabled Apex Class Access (which is at bottom of page), Click Edit. Move your Apex class Available Apex Classes to Enabled Apex Classes. Then save it. Test your button with changed profile which has your apex class access.
If error is occur, then post here. If it is useful, then mark it as best answer (for close this thread).
Regards,
Alap Mistry
This was selected as the best answer
Gabriel Meneses 10Gabriel Meneses 10
Thank you Alap, this did work, I thought I had checked this setting but apparently not. Resolved.
lakv polankilakv polanki
Hi can you please help me.
I have created developer account, which was created by default professional Edition.  I tried a lot to get Enterprize Edition , I even tried Go to Set up -> develop -> there is no Apex class option , the option It has Apex setting which does not contain any provision to do settings.