You need to sign in to do that
Don't have an account?
Travis Seiler
Custom Object won't insert from public access visualforce site
I have a VisualForce page and controller that works great when I test it using preview from within the developer console, but when I try to access it from my VisualForce public access site, the record does not get inserted. I have been checking all of the permissions, but have not been able to find anywhere that has allowed the records to be created. Let me know if I need to add code, etc. But I know the code works, it just seems like a permissions issue somewhere that I am missing...
Thanks for the help.
Hi,
You need to check site settings.
Navigate to Develop--> Sites--> Site Name--> Click on Public Access Settings Button and Provide Necessary settings.
Thanks,
Devendra
So, I have already looked through all of the settings under Public access, and have granted all permissions on the custom objects but when accessing the site from the a browser, and filling out my simple web form, the record does not get created. The form just takes in a couple of fields and creates a new custom object.
Like I already said it works find through the developer console, and I can access the page fine, it just won't create the object. I have checked all of the field accessibility options on the custom objects and have no idea where else to look.
Hi,
Go through this blog and check debug log for site user, which can give us an idea what is happening when code gets executed under site user context.
Thanks,
Devendra
Here is the debug log file (below), I changed the controller to show the new created record, but now it shows an unauthorized page. Looking through the log, it actually looks like it is creating the record, but I go into the view later on and the record does not exist.
Hi,
Just a basic question, have you added the page to which the site redirects post creation of object for the guest profile?