+ Start a Discussion
vamsi krishna 106vamsi krishna 106 

system.security.NoAccessException: Update access denied for Custom Obj, controller action methods may not execute

When i click on button  it performing the Action(Apex Class Method).
on that i am getting this error..and i gave the WITHOUT SHARING to class at the same Object does nothave edit permission on that time i need to do do all CRED operatins..Please give solution or suggetions to solve it..

Thanks in advance..

Vamsi Krishna
srlawr uksrlawr uk
"without sharing" does not affect the CRUD operations you can perform, it only changes the number of records you can change.

ROLES (and "sharing rules") - this alters WHICH RECORDS you can alter of a certain object type (so I can edit my contacts, or I can edit contact records that have been shared with me - or "without sharing" - I can edit any contacts.

PROFILES - affects whether I can even edit any contacts. If I don't have edit permission on contact on my profile I won't be able to edit any contacts even if my role, sharing or "without sharing" tries to give me access to the contact.

You can check your profile settings from Setup -> Manage Users -> Profiles -> [pick profile] -> scroll down to: 

User-added image

(so in this org - no matter what the page shows, or tries to show, the users under this profile won't be able to edit a campaign)