2

Hey guys I really need help with setting up sites:

I have a visualforce page that I am setting up in sites and I have gone through the profile (guest sites user) and given them all the relevant access settings for the objects, visualforce pages & the apex classes.

My page render fine when I access it internally (through SALESFORCEURL/apex/page) but when I access it through the sites URL it has an issue rendering the fields.

Basically I have an account record which I prefil using an ID in the URL Parameter (this is all working and testing via the internal visualforce page). In the internal page it appears as a prefilled editable inputText box which I can edit and submit fine. In sites the fields appear as a non-editable outputLabel that of course I can not edit, and this is the entire purpose of my visualforce page.

Does anyone have a work around for this? Or at least a solid reason as to why it works in the internal visualforce page but not from sites?

Thanks

1
  • Can you post a bit of the markup from the VF page? (presumably it's a controller operating 'with sharing' and an apex:inputField tag in the page) This is almost certainly a permissions issue and should be pretty straight-forward to isolate and correct. It would also be good to know why an anonymous user needs/has the ability to edit an Account record.
    – Mark Pond
    Nov 20, 2013 at 7:37

2 Answers 2

2

Anonymous salesforce Sites doesn't allow you to edit Account records.

http://wiki.developerforce.com/page/Authenticating_Users_on_Force.com_Sites

1

For anybody who comes across this I found a work around; basically in your Apex Class just delete (null) the ID of the record you wish to edit, and then upsert based on an external ID. Not perfect but definitely does the job.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .