You need to sign in to do that
Don't have an account?

system.security.NoAccessException: Create access denied
Hello,
I have a visualforce page with a button which is used to execute some actions and then refresh the page.
In my code, I create instances of a custom object say Custom__c but do not perform any dml with the instance of the object.
I get the following error:
system.security.NoAccessException: Create access denied for Custom__c
when I click the button mentioned above while running as a User that has only ReadOnly access to object Custom__c.
Does anyone has a solution for this.
Thanks,
Gulshan.
HI Gulshan,
Please check the following link once.
https://success.salesforce.com/answers?id=90630000000h3THAAY
Thanks
Gopi
DBSync LLC
www.mydbsync.com
I came upon this post.
But the solution proposed i.e. change the first line of apex code from "public with sharing..." to "public without sharing..." or add create permission to your profile (setup / manage users / profiles / your profile / check create checkbox in account object) would not be the best option in our case.
Thanks again,
Gulshan.