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

Permissions for create/edit on Public Site
I have set the public access settings on a site to allow it full access to a custom object.
I have also set the field level security to visible for all fields on the custom object.
But when i try to insert or update a custom object i get an error "DML currently not allowed". What other settings must i set in order for a public site to create/edit custom objects?
The typical way to get around the DML operations in a controller's constructor is to put your code in a regular method and use the 'action' attribute in the apex: page tag.
Don't know if it'll work with the external submit though ... I think the setters won't have been called yet.
Try it and let us know ...
All Answers
You aren't trying to do the insert in your controller's constructor are you ? You can't do DML operations in constructors.
Can you show us the code ?
one more thing to check:
if you are trying to do this via a component then you need to enable DML for the component. check the component tag attributes.
Yeah thats the problem. I was running DML ops in code that the constructor was calling.
What i'm trying to do have a form outside of force.com submit to the VF page. I need to take those incoming parameters and save them in an object. Since i can only run DML ops inside of actions taken on the page how would you recommend i circumvent this issue? The only thing i can think of is take the incoming params, spit them back out as hidden form fields o the VF page and then have an auto submit which resubmits the page to itself. Not a very ideal solution. Is there any other better way? Thanks!
The typical way to get around the DML operations in a controller's constructor is to put your code in a regular method and use the 'action' attribute in the apex: page tag.
Don't know if it'll work with the external submit though ... I think the setters won't have been called yet.
Try it and let us know ...