You need to sign in to do that
Don't have an account?
Data entry from Sites VF Page
Maybe I'm trying to do the impossible: enter data into Salesforce from a sites page if not logged into Salesforce. Here's what I did:
Data Entry Object. Created it and made it public, completely. Yeah, I know, but it's a DE.
DataEntry VF Page. Controller from above. Single field entry form.
Sites link to bring it up: http://bobbaileyvforce-developer-edition.na9.force.com/EntryForm
The form will come up as you can see but Save doesn't work. Gets "Authorization Required" error, very spiffy page but not what I wanted to see.
Is this even possible? If not, why does web-to-lead and web-to-cases work?
tia... Bob
Bob,
Users of your site page ARE logged in-- as a guest user.
See my "email preferences page":
http://phyrfoxster-developer-edition.na3.force.com/emailPref
Here's the associated code:
This page works just fine, as you can tell from my demo.
So, what's with the "authorization required" message?
This happens when your user receives an unhandled exception and they are not logged in. For example, were the try-catch block not in place, an invalid email address would cause the ugly authorization required page, instead of an informative message.
Try commenting out the try-catch block in this code in your org, and use an invalid email, like "test". You'll see the authorization required message. Using the try-catch block allows the error to surface correctly.
Try using the Debug Logs in setup to see if you can pinpoint the error that's happening.